CVE-2024-50121
Description
In the Linux kernel, the following vulnerability has been resolved:
nfsd: cancel nfsd_shrinker_work using sync mode in nfs4_state_shutdown_net
In the normal case, when we excute echo 0 > /proc/fs/nfsd/threads, the function nfs4_state_destroy_net in nfs4_state_shutdown_net will release all resources related to the hashed nfs4_client. If the nfsd_client_shrinker is running concurrently, the expire_client function will first unhash this client and then destroy it. This can lead to the following warning. Additionally, numerous use-after-free errors may occur as well.
nfsd_client_shrinker echo 0 > /proc/fs/nfsd/threads
expire_client nfsd_shutdown_net unhash_client ... nfs4_state_shutdown_net /* won't wait shrinker exit */ /* cancel_work(&nn->nfsd_shrinker_work) * nfsd_file for this /* won't destroy unhashed client1 */ * client1 still alive nfs4_state_destroy_net */
nfsd_file_cache_shutdown /* trigger warning */ kmem_cache_destroy(nfsd_file_slab) kmem_cache_destroy(nfsd_file_mark_slab) /* release nfsd_file and mark */ __destroy_client
==================================================================== BUG nfsd_file (Not tainted): Objects remaining in nfsd_file on __kmem_cache_shutdown() -------------------------------------------------------------------- CPU: 4 UID: 0 PID: 764 Comm: sh Not tainted 6.12.0-rc3+ #1
dump_stack_lvl+0x53/0x70 slab_err+0xb0/0xf0 __kmem_cache_shutdown+0x15c/0x310 kmem_cache_destroy+0x66/0x160 nfsd_file_cache_shutdown+0xac/0x210 [nfsd] nfsd_destroy_serv+0x251/0x2a0 [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
==================================================================== BUG nfsd_file_mark (Tainted: G B W ): Objects remaining nfsd_file_mark on __kmem_cache_shutdown() --------------------------------------------------------------------
dump_stack_lvl+0x53/0x70 slab_err+0xb0/0xf0 __kmem_cache_shutdown+0x15c/0x310 kmem_cache_destroy+0x66/0x160 nfsd_file_cache_shutdown+0xc8/0x210 [nfsd] nfsd_destroy_serv+0x251/0x2a0 [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
To resolve this issue, cancel nfsd_shrinker_work using synchronous mode in nfs4_state_shutdown_net.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
In the Linux kernel, a race condition in NFSD's client shutdown was fixed by canceling nfsd_shrinker_work in sync mode.
A race condition in the Linux kernel's NFS daemon (nfsd) could lead to a slab-use-after-free or kernel warning [1]. The bug occurs when nfsd_client_shrinker concurrently runs expire_client while the system executes echo 0 > /proc/fs/nfsd/threads to shut down the NFS server [1]. The shrinker may unhash a client that is still referenced, and the shutdown path (nfs4_state_shutdown_net) previously called cancel_work on nfsd_shrinker_work in a non-sync manner, allowing the shrinker to continue after the cancellation [1]. This results in leftover nfsd_file objects being destroyed after the associated slab caches (e.g., nfsd_file_slab, nfsd_file_mark_slab) have been shut down, triggering a BUG warning: Objects remaining in nfsd_file on __kmem_cache_shutdown() [1].
An attacker with local access and the ability to trigger NFS activity and then stop the NFS server (e.g., by writing to /proc/fs/nfsd/threads) could potentially exploit this race to cause a use-after-free [1]. The attack requires control over the timing of NFS client operations and server shutdown but does not require network access beyond local NFS client capabilities [1]. The race window is small but deterministic under controlled conditions, making it a realistic local denial-of-service or privilege-escalation vector [1].
The impact is a kernel crash in the form of a BUG warning and slab corruption, which can lead to system instability or arbitrary code execution due to use-after-free of nfsd_file objects [1]. The issue is rated High with a CVSS v3 score of 7.8, indicating significant impact on confidentiality, integrity, and availability if exploited [1].
The fix has been applied in the Linux kernel stable branches via commit add1df5eba163a3a6ece11cb85890e2e410baaea [2]. The patch changes the nfs4_state_shutdown_net function to call cancel_work_sync(&nn->nfsd_shrinker_work) instead of cancel_work, ensuring the shrinker work is fully completed before proceeding with resource destruction [1][2]. Users should update to a kernel version containing this commit to mitigate the vulnerability [1][2]. In environments where immediate patching is not possible, reducing NFS client activity prior to server shutdown may reduce the risk of triggering the race [1].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
73- osv-coords71 versionspkg:deb/ubuntu/linux@6.11.0-18.18?arch=source&distro=oracularpkg:deb/ubuntu/linux-aws@6.11.0-1009.10?arch=source&distro=oracularpkg:deb/ubuntu/linux-azure@6.11.0-1009.9?arch=source&distro=oracularpkg:deb/ubuntu/linux-gcp@6.11.0-1009.9?arch=source&distro=oracularpkg:deb/ubuntu/linux-lowlatency@6.11.0-1010.11?arch=source&distro=oracularpkg:deb/ubuntu/linux-oracle@6.11.0-1011.12?arch=source&distro=oracularpkg:deb/ubuntu/linux-raspi@6.11.0-1008.8?arch=source&distro=oracularpkg:deb/ubuntu/linux-realtime@6.11.0-1005.5?arch=source&distro=oracularpkg:rpm/opensuse/dtb-aarch64&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-64kb&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-azure&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-debug&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-default-base&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-default&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-docs&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-kvmsmall&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-obs-build&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-obs-qa&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-rt_debug&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-rt&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-source-azure&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-source&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-source&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/kernel-source-longterm&distro=openSUSE%20Tumbleweedpkg:rpm/opensuse/kernel-source-rt&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-syms-azure&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-syms&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-syms-rt&distro=openSUSE%20Leap%2015.6pkg:rpm/opensuse/kernel-zfcpdump&distro=openSUSE%20Leap%2015.6pkg:rpm/suse/kernel-64kb&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP6pkg:rpm/suse/kernel-azure&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP6pkg:rpm/suse/kernel-coco_debug&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Confidential%20Computing%20Technical%20Preview%2015%20SP6pkg:rpm/suse/kernel-coco&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Confidential%20Computing%20Technical%20Preview%2015%20SP6pkg:rpm/suse/kernel-default-base&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP6pkg:rpm/suse/kernel-default-base&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/kernel-default-base&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Enterprise%20High%20Availability%20Extension%2015%20SP6pkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Enterprise%20Live%20Patching%2015%20SP6pkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP6pkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Legacy%2015%20SP6pkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Enterprise%20Workstation%20Extension%2015%20SP6pkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/kernel-default&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/kernel-docs&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP6pkg:rpm/suse/kernel-kvmsmall&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/kernel-kvmsmall&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/kernel-livepatch-MICRO-6-0-RT_Update_4&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/kernel-livepatch-MICRO-6-0-RT_Update_4&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/kernel-livepatch-MICRO-6-0_Update_4&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/kernel-livepatch-MICRO-6-0_Update_4&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/kernel-livepatch-SLE15-SP6-RT_Update_6&distro=SUSE%20Linux%20Enterprise%20Live%20Patching%2015%20SP6pkg:rpm/suse/kernel-livepatch-SLE15-SP6_Update_6&distro=SUSE%20Linux%20Enterprise%20Live%20Patching%2015%20SP6pkg:rpm/suse/kernel-obs-build&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP6pkg:rpm/suse/kernel-rt_debug&distro=SUSE%20Real%20Time%20Module%2015%20SP6pkg:rpm/suse/kernel-rt&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/kernel-rt&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/kernel-rt&distro=SUSE%20Real%20Time%20Module%2015%20SP6pkg:rpm/suse/kernel-source-azure&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP6pkg:rpm/suse/kernel-source-coco&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Confidential%20Computing%20Technical%20Preview%2015%20SP6pkg:rpm/suse/kernel-source&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP6pkg:rpm/suse/kernel-source&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP6pkg:rpm/suse/kernel-source&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/kernel-source&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/kernel-source-rt&distro=SUSE%20Linux%20Micro%206.0pkg:rpm/suse/kernel-source-rt&distro=SUSE%20Linux%20Micro%206.1pkg:rpm/suse/kernel-source-rt&distro=SUSE%20Real%20Time%20Module%2015%20SP6pkg:rpm/suse/kernel-syms-azure&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Public%20Cloud%2015%20SP6pkg:rpm/suse/kernel-syms-coco&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Confidential%20Computing%20Technical%20Preview%2015%20SP6pkg:rpm/suse/kernel-syms&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Development%20Tools%2015%20SP6pkg:rpm/suse/kernel-syms-rt&distro=SUSE%20Real%20Time%20Module%2015%20SP6pkg:rpm/suse/kernel-zfcpdump&distro=SUSE%20Linux%20Enterprise%20Module%20for%20Basesystem%2015%20SP6
< 6.11.0-18.18+ 70 more
- (no CPE)range: < 6.11.0-18.18
- (no CPE)range: < 6.11.0-1009.10
- (no CPE)range: < 6.11.0-1009.9
- (no CPE)range: < 6.11.0-1009.9
- (no CPE)range: < 6.11.0-1010.11
- (no CPE)range: < 6.11.0-1011.12
- (no CPE)range: < 6.11.0-1008.8
- (no CPE)range: < 6.11.0-1005.5
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.8.20.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1.150600.12.12.6
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.10.20.1
- (no CPE)range: < 6.4.0-150600.10.20.1
- (no CPE)range: < 6.4.0-150600.8.20.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.11.8-1.1
- (no CPE)range: < 6.12.11-1.1
- (no CPE)range: < 6.4.0-150600.10.20.1
- (no CPE)range: < 6.4.0-150600.8.20.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.10.20.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.8.20.1
- (no CPE)range: < 6.4.0-15061.9.coco15sp6.1
- (no CPE)range: < 6.4.0-15061.9.coco15sp6.1
- (no CPE)range: < 6.4.0-150600.23.30.1.150600.12.12.6
- (no CPE)range: < 6.4.0-24.1.21.4
- (no CPE)range: < 6.4.0-24.1.21.4
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-24.1
- (no CPE)range: < 6.4.0-24.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-24.1
- (no CPE)range: < 6.4.0-24.1
- (no CPE)range: < 1-1.1
- (no CPE)range: < 1-1.1
- (no CPE)range: < 1-1.2
- (no CPE)range: < 1-1.2
- (no CPE)range: < 1-150600.1.3.1
- (no CPE)range: < 1-150600.13.3.5
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.10.20.1
- (no CPE)range: < 6.4.0-22.1
- (no CPE)range: < 6.4.0-22.1
- (no CPE)range: < 6.4.0-150600.10.20.1
- (no CPE)range: < 6.4.0-150600.8.20.1
- (no CPE)range: < 6.4.0-15061.9.coco15sp6.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-24.1
- (no CPE)range: < 6.4.0-24.1
- (no CPE)range: < 6.4.0-22.1
- (no CPE)range: < 6.4.0-22.1
- (no CPE)range: < 6.4.0-150600.10.20.1
- (no CPE)range: < 6.4.0-150600.8.20.1
- (no CPE)range: < 6.4.0-15061.9.coco15sp6.1
- (no CPE)range: < 6.4.0-150600.23.30.1
- (no CPE)range: < 6.4.0-150600.10.20.1
- (no CPE)range: < 6.4.0-150600.23.30.1
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
9- git.kernel.org/stable/c/add1df5eba163a3a6ece11cb85890e2e410baaeanvdPatch
- git.kernel.org/stable/c/d5ff2fb2e7167e9483846e34148e60c0c016a1f6nvdPatch
- git.kernel.org/stable/c/f965dc0f099a54fca100acf6909abe52d0c85328nvdPatch
- cert-portal.siemens.com/productcert/html/ssa-265688.htmlnvd
- git.kernel.org/stable/c/36775f42e039b01d4abe8998bf66771a37d3cdccnvd
- git.kernel.org/stable/c/5ade4382de16c34d9259cb548f36ec5c4555913cnvd
- git.kernel.org/stable/c/f67138dd338cb564ade7d3755c8cd4f68b46d397nvd
- lists.debian.org/debian-lts-announce/2025/03/msg00001.htmlnvd
- lists.debian.org/debian-lts-announce/2025/03/msg00002.htmlnvd
News mentions
0No linked articles in our index yet.