CVE-2025-40328
Linux Kernel vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Mitigation and workarounds

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).

Community reactions

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).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-64557NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-selftests-internal
NoNoJul 29, 2026
CVE-2026-64556NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-64k-devel
NoNoJul 29, 2026
CVE-2026-64555NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-azure-fde-6.14
NoNoJul 27, 2026
CVE-2026-64554NONEN/A
  • Linux Kernel logoLinux Kernel
  • linux-gcp-6.14
NoYesJul 27, 2026
CVE-2026-64553NONEN/A
  • Linux Kernel logoLinux Kernel
  • kernel-rt-64k-debug-modules-internal
NoYesJul 27, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management