CVE-2025-40320: Linux kernel · smb: client: fix potential cfid UAF in smb2_query_info_compound
Affects Linux kernelSource GCVE Database
Not known to be exploited · CVSS 9.8 Critical · fixed in 6.8.0-1050.53~22.04.1 : patch Linux kernel as a priority.
Data as of 26 Oct 2026, 12:55 UTC
- EPSS
- 0.4% chance of exploitation in 30 days – higher than 35% 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-1052.55~22.04.1 +35
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 8 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@6.17.0-14.14?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-awspkg:deb/ubuntu/linux-aws@6.17.0-1007.7?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-azurepkg:deb/ubuntu/linux-azure@6.17.0-1008.8?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-azure-fdepkg:deb/ubuntu/linux-azure-fde@6.17.0-1017.17?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 25.10linux-gcppkg:deb/ubuntu/linux-gcp@6.17.0-1007.7?arch=source&distro=questingOther threats | Affected
| Fixed in
|
Ubuntu 25.10linux-oraclepkg:deb/ubuntu/linux-oracle@6.17.0-1007.7?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
An official patch is available and should be applied promptly. The vulnerability is fixed by reinitializing the cfid pointer to NULL during retries in smb2_query_info_compound. Users should update to the patched Linux kernel versions as provided by their distribution vendors, such as the Ubuntu security notice USN-8029-1. No additional mitigations are specified or required beyond applying the official fix.
Description
A use-after-free vulnerability was identified and fixed in the Linux kernel's SMB client implementation, specifically in the smb2_query_info_compound function. The flaw occurs when a previously allocated cfid pointer is not reset upon retry, leading to potential use-after-free during cleanup. This issue can cause system instability or compromise. The vulnerability has a high CVSS score of 9.8, indicating critical impact on confidentiality, integrity, and availability. Multiple Linux kernel versions are affected, and an official patch is available as part of a broader Linux kernel security update.
References
- ubuntu.com/security/CVE-2025-40320 (opens in a new tab)
- cve.org/CVERecord?id=CVE-2025-40320 (opens in a new tab)
- git.kernel.org/linus/5c76f9961c170552c1d07c830b5e145475151600 (opens in a new tab)
- git.kernel.org/stable/c/327f89c21601ebb7889f8c97754b76f08ce95a0c (opens in a new tab)
- git.kernel.org/stable/c/5c76f9961c170552c1d07c830b5e145475151600 (opens in a new tab)
- git.kernel.org/stable/c/939c4e33005e2a56ea8fcedddf0da92df864bd3b (opens in a new tab)
- git.kernel.org/stable/c/b556c278d43f4707a9073ca74d55581b4f279806 (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)