Look up another CVE · open CVE-2024-53179 in the interactive tracker
CVE-2024-53179
smb: client: fix use-after-free of signing key
Published 2024-12-27 (22 months ago) by the Linux kernel CNA. Subsystem fs/smb. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-53179 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.12.3-1 | Update the kernel and reboot. Fixed in 6.12.3-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.3-1 | Update the kernel and reboot. Fixed in 6.12.3-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.3-1 | Update the kernel and reboot. Fixed in 6.12.3-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
Customers have reported use-after-free in @ses->auth_key.response with SMB2.1 + sign mounts which occurs due to following race: task A task B cifs_mount() dfs_mount_share() get_session() cifs_mount_get_session() cifs_send_recv() cifs_get_smb_ses() compound_send_recv() cifs_setup_session() smb2_setup_request() kfree_sensitive() smb2_calc_signature() crypto_shash_setkey() *UAF* Fix this by ensuring that we have a valid @ses->auth_key.response by checking whether @ses->ses_status is SES_GOOD or SES_EXITING with @ses->ses_lock held. After commit 24a9799aa8ef ("smb: client: fix UAF in smb2_reconnect_server()"), we made sure to call ->logoff() only when @ses was known to be good (e.g. valid ->auth_key.response), so it's safe to access signing key when @ses->ses_status == SES_EXITING.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
fs/smb/client/smb2proto.h
fs/smb/client/smb2transport.c
- What this is
- COMMON INTERNET FILE SYSTEM CLIENT (CIFS and SMB3)MAINTAINERS section matched on fs/smb/client/ · linux-cifs@vger.kernel.org · Supported
- Kernel module
- cifs
Check it on the machine
grep -wE 'CONFIG_CIFS|CONFIG_SMBFS' /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w cifsPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this as a loadable module. Every release below compiles it as a module on every flavour, so whether the code is in the running kernel depends on whether that module is loaded.
- bookworm, trixie, forky, sidm
- m
- a loadable module on every flavour - check lsmod, can be blacklisted
- Build switches
- CONFIG_CIFS, CONFIG_SMBFS
- Reads as
- all on means the file is compiled; any one off means it is not.
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2024-12-27 (22 months ago)source
- CVSS
- 9.8 critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- network (AV:N)source
- EPSS
- 0.60%, higher than 47.8% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- fs/smb
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 3.12 | 6.6.70 | 39619c65ab4b |
| 3.12 | 6.12.2 | 0e2b654a3848 |
| 3.12 | 6.13 | 343d7fe6df9e |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:NAttack vector, network
- The vulnerable `smb2_calc_signature()` runs in the cifs demultiplex thread on every inbound signed SMB2/2.1 response (`smb2_check_receive` → `smb2_verify_signature`), while the freeing side (`cifs_setup_session()`) is entered on reconnect or DFS re-referral — both driven by the remote SMB server dropping the TCP connection or serving referrals. A malicious, compromised, or spoofed server (or an on-path attacker injecting RSTs) controls both halves of the race purely over the network.
- AC:LAttack complexity, low
- The attacker owns both sides of the race and the window is server-timed: after the free, `auth_key.response` stays NULL across the entire multi-round-trip NTLMSSP handshake, whose latency the server dictates, while `SMB2_IOCTL`/`SMB2_TREE_CONNECT` deliberately bypass the reconnect serialization in `smb2_reconnect()` and go straight to signing. Triggering is repeatable and reliable, not dependent on any condition outside attacker control.
- PR:NPrivileges required, none
- No credentials on the client are needed — the demultiplex/signing path performs no capability or permission check, and the remote peer needs no authentication to tear down the TCP connection or drive session re-setup on an existing mount. The attacker is the network peer, not a local user.
- UI:NUser interaction, none
- Against an already-established SMB2.1 signed mount the attacker forces reconnects and session re-setup at will; no administrator or user action is required at exploitation time. Concurrent requests are supplied by ordinary background client activity (echo, DFS referral, oplock traffic).
- S:UScope, unchanged
- The use-after-free corrupts kernel heap memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- The freed heap object is read and consumed as the HMAC-SHA256 signing key, and the resulting signature is transmitted back to the attacker, forming an oracle over reallocated kernel heap contents. The attacker additionally controls the object's kmalloc size class via the server-supplied NTLMSSP `TargetInfoArray.Length`, making the UAF read a groomable arbitrary-disclosure primitive.
- I:HIntegrity impact, high
- Because the attacker selects the slab and can refill the freed 16 bytes, the client can be made to sign SMB traffic with a key the attacker knows, destroying the integrity guarantee of SMB signing and enabling forged/modified filesystem traffic. As a use-after-free it also carries the standard heap-corruption path to control-flow hijack.
- A:HAvailability impact, high
- Once `auth_key.response` is NULLed, `crypto_shash_setkey(tfm, NULL, 16)` dereferences NULL and oopses the kernel; on the send path this occurs while `server->srv_mutex` is held, permanently wedging all further I/O on that mount. Customers reported this as a production crash.