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

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

CVE-2024-53216

nfsd: release svc_expkey/svc_export with rcu_work

7.8 EPSS 0.2% AV:L

Published 2024-12-27 (22 months ago) by the Linux kernel CNA. Subsystem fs/nfsd. Debian urgency: not yet assigned.

What to do, per Debian release

Debian's own status for CVE-2024-53216 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 last reference for `cache_head` can be reduced to zero in `c_show` and `e_show`(using `rcu_read_lock` and `rcu_read_unlock`). Consequently, `svc_export_put` and `expkey_put` will be invoked, leading to two issues: 1. The `svc_export_put` will directly free ex_uuid. However, `e_show`/`c_show` will access `ex_uuid` after `cache_put`, which can trigger a use-after-free issue, shown below. ================================================================== BUG: KASAN: slab-use-after-free in svc_export_show+0x362/0x430 [nfsd] Read of size 1 at addr ff11000010fdc120 by task cat/870 CPU: 1 UID: 0 PID: 870 Comm: cat Not tainted 6.12.0-rc3+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.1-2.fc37 04/01/2014 Call Trace: <TASK> dump_stack_lvl+0x53/0x70 print_address_description.constprop.0+0x2c/0x3a0 print_report+0xb9/0x280 kasan_report+0xae/0xe0 svc_export_show+0x362/0x430 [nfsd] c_show+0x161/0x390 [sunrpc] seq_read_iter+0x589/0x770 seq_read+0x1e5/0x270 proc_reg_read+0xe1/0x140 vfs_read+0x125/0x530 ksys_read+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Allocated by task 830: kasan_save_stack+0x20/0x40 kasan_save_track+0x14/0x30 __kasan_kmalloc+0x8f/0xa0 __kmalloc_node_track_caller_noprof+0x1bc/0x400 kmemdup_noprof+0x22/0x50 svc_export_parse+0x8a9/0xb80 [nfsd] cache_do_downcall+0x71/0xa0 [sunrpc] cache_write_procfs+0x8e/0xd0 [sunrpc] proc_reg_write+0xe1/0x140 vfs_write+0x1a5/0x6d0 ksys_write+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 868: kasan_save_stack+0x20/0x40 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x37/0x50 kfree+0xf3/0x3e0 svc_export_put+0x87/0xb0 [nfsd] cache_purge+0x17f/0x1f0 [sunrpc] nfsd_destroy_serv+0x226/0x2d0 [nfsd] nfsd_svc+0x125/0x1e0 [nfsd] write_threads+0x16a/0x2a0 [nfsd] nfsctl_transaction_write+0x74/0xa0 [nfsd] vfs_write+0x1a5/0x6d0 ksys_write+0xc1/0x160 do_syscall_64+0x5f/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e 2. We cannot sleep while using `rcu_read_lock`/`rcu_read_unlock`. However, `svc_export_put`/`expkey_put` will call path_put, which subsequently triggers a sleeping operation due to the following `dput`. ============================= WARNING: suspicious RCU usage 5.10.0-dirty #141 Not tainted ----------------------------- ... Call Trace: dump_stack+0x9a/0xd0 ___might_sleep+0x231/0x240 dput+0x39/0x600 path_put+0x1b/0x30 svc_export_put+0x17/0x80 e_show+0x1c9/0x200 seq_read_iter+0x63f/0x7c0 seq_read+0x226/0x2d0 vfs_read+0x113/0x2c0 ksys_read+0xc9/0x170 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x67/0xd1 Fix these issues by using `rcu_work` to help release `svc_expkey`/`svc_export`. This approach allows for an asynchronous context to invoke `path_put` and also facilitates the freeing of `uuid/exp/key` after an RCU grace period.

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/nfsd/export.c
fs/nfsd/export.h

What this is
KERNEL NFSD, SUNRPC, AND LOCKD SERVERSMAINTAINERS section matched on fs/nfsd/ · linux-nfs@vger.kernel.org · Supported
Kernel module
nfsd

Check it on the machine

grep -w CONFIG_NFSD /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 nfsd

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 switch
CONFIG_NFSD

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
7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it
Attack vector
local (AV:L)source
EPSS
0.22%, higher than 11.9% of all CVEssource
CISA KEV
not listedthe KEV catalogue
Debian urgency
not yet assignedsource
Subsystem
fs/nfsd

Upstream fixes

The versions the CNA records as introducing and fixing this, and the commit for each. source

IntroducedFixed inCommit
4.206.6.64bd8524148dd8
4.206.11.112e4854599200
4.206.12.2ad4363a24a57
4.206.13f8c989a0c89a

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:LAttack vector, local
Although the affected subsystem is nfsd, the vulnerable use-after-free is only reachable through a local `read(2)` on `/proc/fs/nfs/exports`, `/proc/fs/nfsd/exports` or `/proc/net/rpc/*/content`; a remote NFS client can drive the freeing half of the race but cannot reach `e_show`/`c_show` itself. Exploitation therefore requires local access.
AC:LAttack complexity, low
The attacker fully controls the reader side with an unbounded, unrate-limited read loop, and can actively drive the freeing side because `nfsd_set_fh_dentry()` performs the export-cache lookup and refresh upcall before any secure-port or access check, on top of the routine `cache_clean()`/`sunrpc_cache_update()`/flush churn on any live NFS server. Controlling both halves of the race makes it reliably winnable.
PR:LPrivileges required, low
`/proc/fs/nfsd/exports` and `/proc/fs/nfsd/export_stats` are registered `S_IRUGO`, and `/proc/fs/nfs/exports` is created with mode 0 which procfs promotes to 0444, so any unprivileged local user can read them. No capability, namespace trick, or group membership is needed.
UI:NUser interaction, none
The attacker simply reads a world-readable procfs file in a loop; no victim action, mount, or administrator involvement is required.
S:UScope, unchanged
The corruption and its consequences are confined to the kernel's own memory within a single security authority, with no VM, IOMMU, or sandbox boundary crossed.
C:HConfidentiality impact, high
The freed `ex_uuid`, `ex_client->name`, `ex_path` dentry chain and `ex_fslocs.locations[]` pointer array are read and copied verbatim into the seq_file buffer returned to the unprivileged reader, so heap grooming of the freed slabs yields disclosure of arbitrary kernel memory to userspace.
I:HIntegrity impact, high
This is a use-after-free on attacker-groomable slab objects, and the reader performs writes into the freed memory — `percpu_counter_sum_positive()` takes `raw_spin_lock_irqsave` on the kfree'd `ex_stats`, and `dput`/`mntput` decrement refcounts on freed dentries/mounts — giving corruption primitives suitable for privilege escalation.
A:HAvailability impact, high
The bug is a KASAN-confirmed slab use-after-free that oopses, plus a NULL dereference when `fsloc->locations` is cleared while `locations_count` remains non-zero, and `dput()` sleeping inside an RCU read-side critical section causing scheduling-while-atomic and RCU stalls — all kernel crashes.