Vulnerabilities
Linux Kernel ksmbd Share Configuration Race Condition Enables Remote Code Execution
A race condition in the Linux kernel’s ksmbd share configuration allows authenticated remote attackers to execute arbitrary code. Only systems with ksmbd enabled are affected; the CVSS score is 8.5. Defenders should patch the kernel or disable ksmbd if not required.
What Happened
A race condition in the handling of share_conf objects within the ksmbd module of the Linux kernel permits authenticated attackers to trigger a kernel‑level code execution. The flaw arises from missing locking when manipulating share configuration data.
Impact
- Severity: CVSS 8.5 (AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H)
- Only systems with ksmbd enabled are vulnerable.
- Requires authentication but allows execution with kernel privileges.
Mitigation
- Apply the official kernel update that includes commit 5258572aa5fd5a7ed01b123b28241e0281b6fb9b.
- If a patch is not immediately available, disable ksmbd by removing the module or setting the appropriate sysctl to prevent its activation.
- Verify the kernel version with
uname -rand ensure it does not contain the vulnerable commit range.
Detection
- Check for the presence of ksmbd:
lsmod | grep ksmbd. - Audit kernel logs for abnormal syscalls or privilege escalations that could indicate exploitation attempts.