CVE-2025-38561
NoneCVSS
—
EPSS
0.4%
Published
Aug 19, 2025
CISA due date
—
Cloudanix analysis
A timing problem in the Linux kernel's file-sharing code could let an attacker who sends many connection requests at once interfere with how sessions are cleaned up, potentially leading to crashes or unauthorized access.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- OS kernel
- Class
- Race Condition
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Race condition in ksmbd session setup allows concurrent requests to interfere with Preauh_HashValue handling, potentially leading to use-after-free or inconsistent state when the value is freed prematurely instead of at connection termination.
Why it matters to the business
Linux systems running the affected kernel versions face elevated risk of local privilege escalation or denial of service in SMB server functionality, especially in environments with high session setup traffic; widespread kernel prevalence increases exposure across servers and containers despite low exploit probability.
How an attack unfolds
An attacker with network access to the ksmbd service sends multiple overlapping session setup requests to trigger the race on Preauh_HashValue, attempting to cause memory corruption or inconsistent session state before the value is properly released at connection close.
How to fix it
Update the Linux kernel to a version containing commit fbf5c0845ed15122a770bca9be1d9b60b470d3aa or later; for Chainguard packages apply openjdk-17-openj9 updates to 0.53.0-r0 or newer that incorporate the fix; rebuild and redeploy any custom kernels or container images using affected sources.
How to confirm the fix worked
Verify the running kernel contains the referenced commit or package version; inspect ksmbd session handling code to confirm Preauh_HashValue is no longer freed during setup; test with concurrent session setup workloads to ensure no premature free occurs.
Typical attack path
- Identify reachable ksmbd instance via network scanning
- Establish initial SMB connection and issue rapid sequence of session setup requests
- Trigger race condition on Preauh_HashValue allocation and free operations
- Exploit resulting memory state for privilege escalation or crash
How to detect it
Review kernel logs and SMB audit trails for repeated session setup attempts from the same client IP within short time windows; look for ksmbd crashes or oops messages around session termination; correlate with any unexplained privilege changes or container escapes on affected systems.
What your security team should do
- Prioritize kernel upgrades on all internet-facing or multi-tenant systems within standard patch windows given low EPSS
- Monitor for related kernel privilege escalation activity from listed threat actor patterns
- Apply defense-in-depth by restricting SMB exposure and enabling kernel hardening features
- Include the fixed commit in automated vulnerability scanning and SBOM processes
The record
In the Linux kernel, the following vulnerability has been resolved: ksmbd: fix Preauh_HashValue race condition If client send multiple session setup requests to ksmbd, Preauh_HashValue race condition could happen. There is no need to free sess->Preauh_HashValue at session setup phase. It can be freed together with session at connection termination phase.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | linux | 0 | No fix |
| Debian:12 | linux | 0 | No fix |
| Debian:13 | linux | 0 | No fix |
| Debian:14 | linux | 0 | No fix |
| Debian:14 | linux | 0 | 6.16.3-1 |
| Linux | Kernel | 5.15.0 | 6.1.148 |
| Mageia:9 | kernel | 0 | 6.6.105-1.mga9 |
| Mageia:9 | kernel-linus | 0 | 6.6.105-1.mga9 |
| Mageia:9 | kmod-virtualbox | 0 | 7.1.10-10.mga9 |
| Mageia:9 | kmod-xtables-addons | 0 | 3.24-86.mga9 |
| Mageia:9 | mageia-repos | 0 | 9-4.mga9 |
| Mageia:9 | meta-task | 0 | 9-4.mga9 |
Related vulnerabilities
- CVE-2025-39885 In the Linux kernel, the following vulnerability has been resolved: ocfs2: fix recursive… Also affects linux
- CVE-2025-39883 In the Linux kernel, the following vulnerability has been resolved: mm/memory-failure… Also affects linux
- CVE-2025-39876 In the Linux kernel, the following vulnerability has been resolved: net: fec: Fix… Also affects linux
- CVE-2025-39869 In the Linux kernel, the following vulnerability has been resolved: dmaengine: ti: edma… Also affects linux
- CVE-2025-39873 In the Linux kernel, the following vulnerability has been resolved: can: xilinx_can… Also affects linux
- CVE-2025-39863 In the Linux kernel, the following vulnerability has been resolved: wifi: brcmfmac: fix… Also affects linux
- CVE-2025-39865 In the Linux kernel, the following vulnerability has been resolved: tee: fix NULL pointer… Also affects linux
- CVE-2025-39866 In the Linux kernel, the following vulnerability has been resolved: fs: writeback: fix… Also affects linux