CVE-2025-40039: Linux kernel · ksmbd: Fix race condition in RPC handle list access
Affects Linux kernelSource GCVE Database
Not known to be exploited · CVSS 8.8 High · fixed in 6.8.0-1057.60~22.04.1 : patch Linux kernel soon.
Data as of 26 Oct 2026, 17:16 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 23% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 6.8.0-1057.60~22.04.1, 6.8.0-1059.65~22.04.1, 6.8.0-1058.65~22.04.1 +39
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 28 Oct 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 25.10linuxpkg:deb/ubuntu/linux?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-awspkg:deb/ubuntu/linux-aws?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-azurepkg:deb/ubuntu/linux-azure?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-azure-fdepkg:deb/ubuntu/linux-azure-fde?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 25.10linux-gcppkg:deb/ubuntu/linux-gcp?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-oraclepkg:deb/ubuntu/linux-oracle?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available that corrects the locking implementation in the ksmbd subsystem to prevent race conditions. Users should apply the official Linux kernel updates as provided by their distribution, such as the Ubuntu security notice USN-8029-1. No additional mitigations are required beyond applying the vendor-provided fix.
Description
A race condition vulnerability in the Linux kernel's ksmbd subsystem was fixed. The issue involved improper locking of the 'sess->rpc_handle_list' XArray, which manages RPC handles within a ksmbd session. Incorrect use of read locks instead of write locks during modification operations and lack of locking during lookups could lead to data corruption or use-after-free conditions. The fix ensures proper exclusive write locks during modifications and read locks during lookups to prevent concurrent access issues.
References
- ubuntu.com/security/CVE-2025-40039 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-40039 (opens in a new tab)
- git.kernel.org/linus/305853cce379407090a73b38c5de5ba748893aee (opens in a new tab)
- git.kernel.org/stable/c/305853cce379407090a73b38c5de5ba748893aee (opens in a new tab)
- git.kernel.org/stable/c/5cc679ba0f4505936124cd4179ba66bb0a4bd9f3 (opens in a new tab)
- git.kernel.org/stable/c/6bd7e0e55dcea2cf0d391bbc21c2eb069b4be3e1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8029-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8030-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8029-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8048-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8029-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-8278-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8289-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8296-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8296-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8289-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8278-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8393-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8440-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8499-1 (opens in a new tab)