# CVE-2024-50121: nfsd: cancel nfsd\_shrinker\_work using sync mode in nfs4\_state\_shutdown\_net

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 15, 2026-12-04)
- **CWE:** CWE-416
- **Published:** 2024-11-05T17:10:50.523Z
- **Modified:** 2026-10-15T01:19:07.380Z

## Who should check

- Anyone running Linux \>= 2bbf10861d51dae76c6da7113516d0071c782653, \< f67138dd338cb564ade7d3755c8cd4f68b46d397; \>= 958294a3eb82026fcfff20b0287a90e9c854785e, \< 5ade4382de16c34d9259cb548f36ec5c4555913c; \>= f3ea5ec83d1a827f074b2b660749817e0bf2b23e, \< 36775f42e039b01d4abe8998bf66771a37d3cdcc; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< f965dc0f099a54fca100acf6909abe52d0c85328; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< add1df5eba163a3a6ece11cb85890e2e410baaea; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< d5ff2fb2e7167e9483846e34148e60c0c016a1f6; \>= 5.10.220, \< 5.10.233; \>= 5.15.154, \< 5.15.176; \>= 6.1.81, \< 6.1.123
- Anyone running Linux 6.2

## 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.

## Affected and fixed versions

- Linux: \>= 2bbf10861d51dae76c6da7113516d0071c782653, \< f67138dd338cb564ade7d3755c8cd4f68b46d397; \>= 958294a3eb82026fcfff20b0287a90e9c854785e, \< 5ade4382de16c34d9259cb548f36ec5c4555913c; \>= f3ea5ec83d1a827f074b2b660749817e0bf2b23e, \< 36775f42e039b01d4abe8998bf66771a37d3cdcc; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< f965dc0f099a54fca100acf6909abe52d0c85328; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< add1df5eba163a3a6ece11cb85890e2e410baaea; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< d5ff2fb2e7167e9483846e34148e60c0c016a1f6; \>= 5.10.220, \< 5.10.233; \>= 5.15.154, \< 5.15.176; \>= 6.1.81, \< 6.1.123 (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- Upgrade Linux to 6.1.123 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-50121. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-50121.md
Affected: Linux >= 2bbf10861d51dae76c6da7113516d0071c782653, < f67138dd338cb564ade7d3755c8cd4f68b46d397; >= 958294a3eb82026fcfff20b0287a90e9c854785e, < 5ade4382de16c34d9259cb548f36ec5c4555913c; >= f3ea5ec83d1a827f074b2b660749817e0bf2b23e, < 36775f42e039b01d4abe8998bf66771a37d3cdcc; >= 7c24fa225081f31bc6da6a3…
Fixed in: Linux 5ade4382de16c34d9259cb548f36ec5c4555913c, Linux 36775f42e039b01d4abe8998bf66771a37d3cdcc, Linux 5.10.233, Linux 5.15.176, Linux 6.1.123

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-50121 being exploited?

There is no confirmed exploitation: CVE-2024-50121 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-12-04).

### How serious is CVE-2024-50121?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-50121?

Linux \>= 2bbf10861d51dae76c6da7113516d0071c782653, \< f67138dd338cb564ade7d3755c8cd4f68b46d397; \>= 958294a3eb82026fcfff20b0287a90e9c854785e, \< 5ade4382de16c34d9259cb548f36ec5c4555913c; \>= f3ea5ec83d1a827f074b2b660749817e0bf2b23e, \< 36775f42e039b01d4abe8998bf66771a37d3cdcc; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< f965dc0f099a54fca100acf6909abe52d0c85328; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< add1df5eba163a3a6ece11cb85890e2e410baaea; \>= 7c24fa225081f31bc6da6a355c1ba801889ab29a, \< d5ff2fb2e7167e9483846e34148e60c0c016a1f6; \>= 5.10.220, \< 5.10.233; \>= 5.15.154, \< 5.15.176; \>= 6.1.81, \< 6.1.123; Linux 6.2.

### Is there a fix for CVE-2024-50121?

Yes. Fixed in Linux 5ade4382de16c34d9259cb548f36ec5c4555913c, Linux 36775f42e039b01d4abe8998bf66771a37d3cdcc, Linux 5.10.233, Linux 5.15.176, Linux 6.1.123. Upgrade Linux to 6.1.123 or later.

### How do I check if I'm affected by CVE-2024-50121?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/f965dc0f099a54fca100acf6909abe52d0c85328>
- patch: <https://git.kernel.org/stable/c/add1df5eba163a3a6ece11cb85890e2e410baaea>
- patch: <https://git.kernel.org/stable/c/d5ff2fb2e7167e9483846e34148e60c0c016a1f6>
- other: <https://git.kernel.org/stable/c/f67138dd338cb564ade7d3755c8cd4f68b46d397>
- other: <https://git.kernel.org/stable/c/5ade4382de16c34d9259cb548f36ec5c4555913c>
- other: <https://git.kernel.org/stable/c/36775f42e039b01d4abe8998bf66771a37d3cdcc>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html>
- other: <https://cert-portal.siemens.com/productcert/html/ssa-265688.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-50121>

HTML: <https://flawdb.com/CVE-2024-50121> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-50121>
