Junglewise Threat Intelligence

CVE-2025-38561: Linux Kernel ksmbd race condition in session setup

CVE-2025-38561 · Severity: critical · CVSS 9.8 · Published 2025-08-19

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability exists in the Linux kernel's ksmbd component, which provides SMB file sharing services. By sending multiple simultaneous connection requests, an attacker could trigger a race condition that leads to a system crash or potentially unauthorized data access. This could impact the availability of file services and the confidentiality of stored data.

Technical details

A race condition exists in the ksmbd component of the Linux kernel within the smb2_sess_setup function in fs/smb/server/smb2pdu.c. The vulnerability is caused by improper synchronization when handling Preauth_HashValue during concurrent session setup requests from a single client. Specifically, the code attempted to free sess->Preauth_HashValue during the session setup phase, leading to a potential use-after-free or double-free scenario if multiple requests were processed simultaneously. The fix involves deferring the freeing of this hash value until the connection termination phase. This is reachable over the network without authentication, potentially allowing for remote code execution or denial of service.

Affected products

  • Linux Linux Kernel 5.15 to 6.16.1

Timeline

  • 2025-07-25: patched: Initial fix authored by Namjae Jeon
  • 2025-08-19: disclosed: CVE published

References

Related threats