Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2024-53179 Overview
CVE-2024-53179 is a use-after-free vulnerability in the Linux kernel's SMB client code [CWE-416]. The flaw affects the cifs module when customers mount SMB 2.1 shares with signing enabled. A race condition between cifs_mount() and cifs_send_recv() can free the session authentication key (ses->auth_key.response) while another task uses it to compute SMB2 signatures through crypto_shash_setkey(). Successful exploitation enables local privilege escalation or kernel memory corruption. Linux kernel maintainers resolved the issue by validating session state (SES_GOOD or SES_EXITING) under ses->ses_lock before touching the signing key.
Critical Impact
Local attackers triggering concurrent SMB operations can corrupt kernel memory, enabling privilege escalation to root on hosts mounting SMB 2.1 shares with signing.
Affected Products
- Linux Kernel (SMB client / cifs module)
- Distributions shipping vulnerable kernels prior to the backported fixes
- Systems mounting SMB 2.1 shares with the sign mount option
Discovery Timeline
- 2024-12-27 - CVE-2024-53179 published to NVD
- 2026-08-04 - Last updated in NVD database
Technical Details for CVE-2024-53179
Vulnerability Analysis
The vulnerability resides in the SMB client stack (fs/smb/client). Two kernel tasks race on the same cifs_ses structure. Task A executes cifs_mount() -> dfs_mount_share() -> get_session() -> cifs_mount_get_session() -> cifs_get_smb_ses() -> cifs_setup_session(), which calls kfree_sensitive() on ses->auth_key.response. Task B concurrently runs cifs_send_recv() -> compound_send_recv() -> smb2_setup_request() -> smb2_calc_signature(), which passes the already-freed buffer to crypto_shash_setkey(). The resulting use-after-free corrupts kernel heap memory used by the crypto subsystem.
Root Cause
The root cause is missing synchronization around session state transitions. cifs_setup_session() frees and replaces the authentication key without holding ses->ses_lock, while signing paths read the same key without checking session status. Prior commit 24a9799aa8ef ("smb: client: fix UAF in smb2_reconnect_server()") ensured ->logoff() only runs when the session is good, which makes it safe to access the signing key when ses_status == SES_EXITING, but the signing path still lacked an explicit guard.
Attack Vector
Exploitation requires local access and the ability to trigger SMB mount or reconnect operations against a server configured with SMB 2.1 and signing. An attacker schedules parallel I/O against an SMB session while a mount or DFS referral forces session renegotiation. Winning the race corrupts kernel memory and can be chained into privilege escalation. The fix guards signing-key access by checking ses->ses_status under ses->ses_lock and only proceeds when the state is SES_GOOD or SES_EXITING.
Detection Methods for CVE-2024-53179
Indicators of Compromise
- Kernel oops or KASAN: use-after-free reports referencing smb2_calc_signature, crypto_shash_setkey, or cifs_setup_session
- Unexpected cifs module crashes on hosts mounting SMB 2.1 shares with the sign option
- dmesg entries showing cifs_mount and compound_send_recv on adjacent call stacks before a panic
Detection Strategies
- Inventory Linux hosts and compare running kernel versions against patched commits 0e2b654a, 343d7fe6, and 39619c65
- Audit /proc/mounts and /etc/fstab for cifs mounts using vers=2.1 with sec=* signing options
- Enable KASAN on test kernels to surface use-after-free conditions during SMB stress testing
Monitoring Recommendations
- Forward kernel logs to a centralized SIEM and alert on cifs or smb subsystem crashes
- Monitor for unexpected process privilege changes following cifs subsystem errors
- Track SMB mount and unmount events on servers that expose SMB 2.1 shares
How to Mitigate CVE-2024-53179
Immediate Actions Required
- Apply the vendor kernel update that includes the upstream fix for the cifs signing-key race
- Prioritize patching multi-tenant hosts, developer workstations, and servers mounting SMB shares
- Restrict local shell access on systems where kernel updates cannot be deployed immediately
Patch Information
The fix adds an ses->ses_lock-protected check that only accesses ses->auth_key.response when ses->ses_status is SES_GOOD or SES_EXITING. Patched commits are available upstream:
Rebuild or install the distribution kernel that incorporates these commits and reboot to activate the fix.
Workarounds
- Where feasible, mount SMB shares using SMB 3.0 or later, which uses different session handling paths
- Avoid the sign mount option on SMB 2.1 shares until the kernel is patched, accepting the integrity trade-off only on trusted networks
- Unload the cifs module on hosts that do not require SMB client functionality using modprobe -r cifs
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

