CVE-2024-53177
kernel: smb: prevent use-after-free due to open_cached_dir error paths
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · December 27, 2024
Updated · October 31, 2026
Description
A flaw was found in the Linux kernel's SMB (Server Message Block) client subsystem. When an error occurs while parsing directory lease information from a server, a race condition during error handling can cause directory caching data structures to be freed while background tasks are still processing them. A malicious or compromised SMB server could exploit this flaw to cause a use-after-free condition, resulting in a system crash and Denial of Service (DoS) or potential arbitrary code execution.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
To mitigate this vulnerability, prevent the CIFS/SMB kernel module from loading if SMB network shares are not required on the system.
- Disable autoloading of the
cifsmodule by creating a configuration file:
echo "install cifs /bin/true" > /etc/modprobe.d/disable-cifs.conf
- If the module is currently loaded, unmount any active CIFS shares and unload the module:
modprobe -r cifs
Warning: Unloading the module or restarting the system to apply this configuration will terminate active CIFS connections and may disrupt running services. A system reboot may be required if active dependencies prevent module removal.
Caveat: This mitigation prevents the system from mounting or interacting with remote SMB and CIFS file shares.
CVSS / CWE
CVSS 3.1 · 6.7CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
CWE-416 · Use After Free