CVE-2025-40328: Linux kernel · smb: client: fix potential UAF in smb2_close_cached_fid()
Source GCVE Database
Not known to be exploited · CVSS 8.8 High.
Data as of 26 Oct 2026, 10:12 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.
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
AI-suggested
A fix for this vulnerability has been implemented in the Linux kernel by modifying the reference counting mechanism to use kref_put_lock() with the appropriate locking. Users and administrators should apply the official Linux kernel updates that include this fix. Patch status is not explicitly confirmed in the provided data; therefore, check the vendor or Linux kernel mailing list advisories for the specific patch and update guidance.
Description
A use-after-free vulnerability was identified and resolved in the Linux kernel SMB client code, specifically in the smb2_close_cached_fid() function. The issue involved a race condition where a new reference could be acquired after the reference count dropped to zero but before a lock was obtained, leading to potential use-after-free. The fix involved changing to kref_put_lock() to ensure the release function is called with the appropriate lock held, preventing this race condition.
References
- nvd.nist.gov/vuln/detail/CVE-2025-40328 (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)