
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-40328 is a use-after-free (UAF) vulnerability in the Linux kernel's SMB (Server Message Block) client component, specifically in the smb2_close_cached_fid() function. It was published on December 9, 2025, and affects Linux kernel versions starting from commit ebe98f1447bbccf8228335c62d86af02a0ed23f7, with patches available in kernel versions 6.6.117, 6.12.58, 6.17.8, and 6.18. The vulnerability carries a CVSS v3.1 base score of 7.0 (High), requiring local access with low privileges and high attack complexity (MSRC, ENISA EUVD).
The root cause is a race condition (CWE-416: Use After Free) in the Linux kernel's CIFS/SMB2 client code. Specifically, find_or_create_cached_dir() can acquire a new reference to a cached file ID (cfid) object after kref_put() has observed the reference count drop to zero, but before cfid_list_lock is acquired in smb2_close_cached_fid(). This timing window allows the object to be freed and then accessed again, constituting a classic use-after-free condition. The fix replaces kref_put() with kref_put_lock(), ensuring that cfid_release() is called while cfid_list_lock is held, eliminating the race window (ENISA EUVD, Kernel Patch).
Successful exploitation could allow a low-privileged local attacker to cause system instability, potentially execute arbitrary code, or compromise the confidentiality, integrity, and availability of the affected system. The CVSS scoring reflects high impact across all three security dimensions, indicating that a successful exploit could result in full system compromise. The vulnerability is scoped to the local system, limiting direct lateral movement, but privilege escalation to kernel-level access would significantly expand an attacker's capabilities (MSRC, ENISA EUVD).
The primary remediation is to update the Linux kernel to a patched version. The following versions contain the fix: 6.6.117, 6.12.58, 6.17.8, and 6.18. Corresponding kernel patches are available in the stable kernel repository. As a secondary measure, restricting local user access and monitoring for unusual kernel-level behavior can reduce the attack surface. Distributions such as SUSE have also issued advisories and updated packages incorporating this fix (ENISA EUVD, MSRC, Linux Security).
Microsoft's Security Response Center published an advisory for this CVE on December 10, 2025, noting its impact on the Azure Linux 3 kernel package (azl3_kernel_6.6.112.1-2). ENISA catalogued the vulnerability under EUVD-2025-201874. No notable independent researcher commentary or significant social media discussion has been identified beyond standard vulnerability tracking and scanner detection entries from Qualys and Tenable/Nessus (MSRC, ENISA EUVD).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."