CVE-2025-40328: Linux kernel · smb: client: fix potential UAF in smb2_close_cached_fid()
Affects Linux kernelSource GCVE Database
Not known to be exploited · CVSS 8.8 High · fixed in 6.8.0-1050.53~22.04.1 : patch Linux kernel soon.
Data as of 26 Oct 2026, 16:06 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 39% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 6.8.0-1050.53~22.04.1, 6.8.0-1051.57~22.04.1, 6.8.0-1058.65~22.04.1 +38
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 9 Dec 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 and should be applied promptly. The Ubuntu advisory USN-8029-1 confirms that fixes have been released for affected Linux kernel versions. Users should update their Linux kernel packages to the fixed versions provided by their distribution vendors. No additional mitigation steps are required beyond applying the official patches.
Description
A use-after-free vulnerability in the Linux kernel's SMB client was fixed. The flaw involved the smb2_close_cached_fid() function where a reference count could drop to zero before a lock was acquired, potentially leading to use-after-free. The issue was addressed by switching to a locking mechanism that ensures safe reference release. This vulnerability affects multiple Linux kernel versions and has a high CVSS score of 8.8. A patch is available as part of the Linux kernel updates.
References
- ubuntu.com/security/CVE-2025-40328 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-40328 (opens in a new tab)
- git.kernel.org/linus/734e99623c5b65bf2c03e35978a0b980ebc3c2f8 (opens in a new tab)
- git.kernel.org/stable/c/065bd62412271a2d734810dd50336cae88c54427 (opens in a new tab)
- git.kernel.org/stable/c/734e99623c5b65bf2c03e35978a0b980ebc3c2f8 (opens in a new tab)
- git.kernel.org/stable/c/bdb596ceb4b7c3f28786a33840263728217fbcf5 (opens in a new tab)
- git.kernel.org/stable/c/cb52d9c86d70298de0ab7c7953653898cbc0efd6 (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-8095-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8100-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8095-2 (opens in a new tab)
- ubuntu.com/security/notices/USN-8095-3 (opens in a new tab)
- ubuntu.com/security/notices/USN-8095-4 (opens in a new tab)
- ubuntu.com/security/notices/USN-8125-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8126-1 (opens in a new tab)
- ubuntu.com/security/notices/USN-8095-5 (opens in a new tab)