Linux Kernel ksmbd Session User Object Race Condition Information Disclosure Vulnerability
The ksmbd SMB server in the Linux kernel lacked proper locking when handling SMB2_QUERY_INFO and SMB2_LOGOFF commands, creating a race condition on a session user object. A remote, unauthenticated attacker could use this to disclose sensitive kernel information and, combined with other flaws, potentially execute code in the kernel.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to disclose sensitive information on affected installations of Linux Kernel. Authentication is not required to exploit this vulnerability, but only systems with ksmbd enabled are vulnerable.
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 a shared session user object while processing SMB2_QUERY_INFO and SMB2_LOGOFF commands, allowing a race condition.
Impact
A remote unauthenticated attacker could disclose sensitive kernel information and, in conjunction with other vulnerabilities, could execute arbitrary code in the kernel context; only systems with ksmbd enabled are affected.
What the attacker needed
Ksmbd enabled on the target; network access to the SMB service; no authentication required
The fix
Linux issued an update to correct this 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.
The Linux kernel can act as a file-sharing server through a component called ksmbd, which speaks the SMB protocol used by Windows networks. Two kinds of requests handled at the same time could interfere with each other because the code did not lock a shared object, letting an outsider read memory they should not see. Reading kernel memory can leak secrets and is often a stepping stone to running malicious code.
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.