Linux Kernel ksmbd PreviousSessionId Race Condition Remote Code Execution Vulnerability
The ksmbd component of the Linux kernel mishandles sessions that carry a PreviousSessionId because it does not lock an object properly during those operations. An authenticated remote attacker could exploit this to run code in the kernel context.
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Linux Kernel. Authentication is required to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a missing lock around the object handling for sessions that reference a PreviousSessionId, creating a race condition.
Impact
An authenticated remote attacker could execute code in the context of the kernel, but only on systems where ksmbd is enabled.
What the attacker needed
Ksmbd enabled on the target; valid credentials to authenticate
The fix
Linux issued an update to correct the vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
ksmbd is a file-sharing server built into the Linux kernel. When two parts of the kernel work on the same data at the same time without a lock, they can interfere with each other, and an attacker who can log in may turn that confusion into running their own code with the highest privileges.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.