data built 2026-10-19T13:16:53Z

Look up another CVE · open CVE-2024-53176 in the interactive tracker

CVE-2024-53176

smb: During unmount, ensure all cached dir instances drop their dentry

9.8 EPSS 0.6% AV:N

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-53176 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

ReleaseStatus VersionWhat this means
Debian 12bookwormvulnerable6.1.190-1No 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 13trixiefixed6.12.3-1Update the kernel and reboot. Fixed in 6.12.3-1. A running kernel keeps the old code until the machine restarts.
Debian 14forkyfixed6.12.3-1Update the kernel and reboot. Fixed in 6.12.3-1. A running kernel keeps the old code until the machine restarts.
Debian unstablesidfixed6.12.3-1Update 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

The unmount process (cifs_kill_sb() calling close_all_cached_dirs()) can race with various cached directory operations, which ultimately results in dentries not being dropped and these kernel BUGs: BUG: Dentry ffff88814f37e358{i=1000000000080,n=/} still in use (2) [unmount of cifs cifs] VFS: Busy inodes after unmount of cifs (cifs) ------------[ cut here ]------------ kernel BUG at fs/super.c:661! This happens when a cfid is in the process of being cleaned up when, and has been removed from the cfids->entries list, including: - Receiving a lease break from the server - Server reconnection triggers invalidate_all_cached_dirs(), which removes all the cfids from the list - The laundromat thread decides to expire an old cfid. To solve these problems, dropping the dentry is done in queued work done in a newly-added cfid_put_wq workqueue, and close_all_cached_dirs() flushes that workqueue after it drops all the dentries of which it's aware. This is a global workqueue (rather than scoped to a mount), but the queued work is minimal. The final cleanup work for cleaning up a cfid is performed via work queued in the serverclose_wq workqueue; this is done separate from dropping the dentries so that close_all_cached_dirs() doesn't block on any server operations. Both of these queued works expect to invoked with a cfid reference and a tcon reference to avoid those objects from being freed while the work is ongoing. While we're here, add proper locking to close_all_cached_dirs(), and locking around the freeing of cfid->dentry.

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/cached_dir.c
fs/smb/client/cached_dir.h
fs/smb/client/cifsfs.c
fs/smb/client/cifsglob.h
fs/smb/client/inode.c
fs/smb/client/trace.h

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 cifs

Prints 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.56%, higher than 45.4% 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

IntroducedFixed inCommit
6.16.6.6473934e535cff
6.16.11.11ff4528bbc82d
6.16.12.2548812afd969
6.16.133fa640d035e5

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 teardown side of the race is driven entirely by SMB traffic from the remote server over TCP/445 — an unsolicited SMB2 lease-break packet reaches `cached_dir_lease_break()` from `cifs_demultiplex_thread()`, and a dropped connection or `STATUS_NETWORK_NAME_DELETED` forces `invalidate_all_cached_dirs()`. A malicious, compromised, DFS-redirected, or on-path SMB server thus triggers the vulnerable window remotely.
AC:LAttack complexity, low
The attacker fully controls one side of the race and can hold it open indefinitely — flooding lease breaks for every cached dir (default up to `max_cached_dirs`) or keeping the client in a reconnect loop leaves cfids off `cfids->entries` with dentries still held for a workqueue round-trip, while the unmount side is a routine, endlessly repeated event (autofs/systemd idle unmounts, container teardown, shutdown). No memory grooming, no non-default config (`dir_cache_timeout` defaults to 30), and unlimited retries across every client.
PR:NPrivileges required, none
The malicious SMB server needs no credentials or privileges on the victim client; the client authenticates to the server, not the reverse, and lease-break frames are processed by the demux thread with no client-side authorization. Without enforced signing an off-path/on-path attacker can inject the break frames just as well.
UI:NUser interaction, none
No victim action is needed — the mount pre-exists, lease breaks and reconnect-driven invalidation are handled automatically by the kernel, and the racing unmount occurs unattended via automount idle timeouts, container/pod teardown, or system shutdown.
S:UScope, unchanged
The corruption is confined to the cifs client's own kernel objects (cached_fid, dentry, superblock) within the kernel's security authority; no VM, IOMMU, or sandbox boundary is crossed.
C:HConfidentiality impact, high
The unlocked walk of `cfids->entries` races with `list_del()` plus `kfree(cfid)` in `free_cached_dir()`, so the unmount path dereferences a freed (and potentially reallocated) cached_fid and follows attacker-influenced pointers; combined with the dentry refcount underflow from the double `dput()`, this yields a use-after-free on dentry-cache objects leveragable for kernel memory disclosure.
I:HIntegrity impact, high
The race produces a double `dput()` of the same `cfid->dentry` (the fix adds `fid_lock` around every read/clear of it), underflowing the dentry lockref and freeing a live dentry — a classic UAF write primitive via the dentry slab and its `d_op` vtable — plus a NULL store into an already-freed cached_fid object.
A:HAvailability impact, high
The reported outcome is an outright kernel BUG — "Dentry still in use", "VFS: Busy inodes after unmount", and `BUG at fs/super.c` via `CHECK_DATA_CORRUPTION` — with surviving inodes poisoned by `VFS_PTR_POISON` and deferred `dput()`s touching a freed superblock, guaranteeing a panic or later oops.