# CVE-2024-50106: nfsd: fix race between laundromat and free\_stateid

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

- **Severity:** CRITICAL 9.8
- **CVSS:** 9.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; 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:** Remote, no login needed
- **EPSS:** 0.66% (percentile 47, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-11-05T17:10:40.747Z
- **Modified:** 2026-08-05T11:41:42.406Z

## Who should check

- Anyone running Linux \>= 83e733161fde43e2f99cefa68e369944460fce39, \< 967faa26f313a62e7bebc55d5b8122eaee43b929; \>= 83e733161fde43e2f99cefa68e369944460fce39, \< 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a
- Anyone running Linux 6.9

## Description

In the Linux kernel, the following vulnerability has been resolved:

nfsd: fix race between laundromat and free\_stateid

There is a race between laundromat handling of revoked delegations
and a client sending free\_stateid operation. Laundromat thread
finds that delegation has expired and needs to be revoked so it
marks the delegation stid revoked and it puts it on a reaper list
but then it unlock the state lock and the actual delegation revocation
happens without the lock. Once the stid is marked revoked a racing
free\_stateid processing thread does the following (1) it calls
list\_del\_init() which removes it from the reaper list and (2) frees
the delegation stid structure. The laundromat thread ends up not
calling the revoke\_delegation() function for this particular delegation
but that means it will no release the lock lease that exists on
the file.

Now, a new open for this file comes in and ends up finding that
lease list isn't empty and calls nfsd\_breaker\_owns\_lease() which ends
up trying to derefence a freed delegation stateid. Leading to the
followint use-after-free KASAN warning:

kernel: ==================================================================
kernel: BUG: KASAN: slab-use-after-free in nfsd\_breaker\_owns\_lease+0x140/0x160 \[nfsd\]
kernel: Read of size 8 at addr ffff0000e73cd0c8 by task nfsd/6205
kernel:
kernel: CPU: 2 UID: 0 PID: 6205 Comm: nfsd Kdump: loaded Not tainted 6.11.0-rc7+ \#9
kernel: Hardware name: Apple Inc. Apple Virtualization Generic Platform, BIOS 2069.0.0.0.0 08/03/2024
kernel: Call trace:
kernel: dump\_backtrace+0x98/0x120
kernel: show\_stack+0x1c/0x30
kernel: dump\_stack\_lvl+0x80/0xe8
kernel: print\_address\_description.constprop.0+0x84/0x390
kernel: print\_report+0xa4/0x268
kernel: kasan\_report+0xb4/0xf8
kernel: \_\_asan\_report\_load8\_noabort+0x1c/0x28
kernel: nfsd\_breaker\_owns\_lease+0x140/0x160 \[nfsd\]
kernel: nfsd\_file\_do\_acquire+0xb3c/0x11d0 \[nfsd\]
kernel: nfsd\_file\_acquire\_opened+0x84/0x110 \[nfsd\]
kernel: nfs4\_get\_vfs\_file+0x634/0x958 \[nfsd\]
kernel: nfsd4\_process\_open2+0xa40/0x1a40 \[nfsd\]
kernel: nfsd4\_open+0xa08/0xe80 \[nfsd\]
kernel: nfsd4\_proc\_compound+0xb8c/0x2130 \[nfsd\]
kernel: nfsd\_dispatch+0x22c/0x718 \[nfsd\]
kernel: svc\_process\_common+0x8e8/0x1960 \[sunrpc\]
kernel: svc\_process+0x3d4/0x7e0 \[sunrpc\]
kernel: svc\_handle\_xprt+0x828/0xe10 \[sunrpc\]
kernel: svc\_recv+0x2cc/0x6a8 \[sunrpc\]
kernel: nfsd+0x270/0x400 \[nfsd\]
kernel: kthread+0x288/0x310
kernel: ret\_from\_fork+0x10/0x20

This patch proposes a fixed that's based on adding 2 new additional
stid's sc\_status values that help coordinate between the laundromat
and other operations (nfsd4\_free\_stateid() and nfsd4\_delegreturn()).

First to make sure, that once the stid is marked revoked, it is not
removed by the nfsd4\_free\_stateid(), the laundromat take a reference
on the stateid. Then, coordinating whether the stid has been put
on the cl\_revoked list or we are processing FREE\_STATEID and need to
make sure to remove it from the list, each check that state and act
accordingly. If laundromat has added to the cl\_revoke list before
the arrival of FREE\_STATEID, then nfsd4\_free\_stateid() knows to remove
it from the list. If nfsd4\_free\_stateid() finds that operations arrived
before laundromat has placed it on cl\_revoke list, it marks the state
freed and then laundromat will no longer add it to the list.

Also, for nfsd4\_delegreturn() when looking for the specified stid,
we need to access stid that are marked removed or freeable, it means
the laundromat has started processing it but hasn't finished and this
delegreturn needs to return nfserr\_deleg\_revoked and not
nfserr\_bad\_stateid. The latter will not trigger a FREE\_STATEID and the
lack of it will leave this stid on the cl\_revoked list indefinitely.

## Affected and fixed versions

- Linux: \>= 83e733161fde43e2f99cefa68e369944460fce39, \< 967faa26f313a62e7bebc55d5b8122eaee43b929; \>= 83e733161fde43e2f99cefa68e369944460fce39, \< 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a (cvelist)
- Linux: 6.9 (cvelist)

## Mitigation

- Upgrade Linux to 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a 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-50106. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-50106.md
Affected: Linux >= 83e733161fde43e2f99cefa68e369944460fce39, < 967faa26f313a62e7bebc55d5b8122eaee43b929; >= 83e733161fde43e2f99cefa68e369944460fce39, < 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a; Linux 6.9
Fixed in: Linux 967faa26f313a62e7bebc55d5b8122eaee43b929, Linux 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a

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-50106 being exploited?

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

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

Critical: CVSS 9.8 (v3.1, scored by CNA). Remote, no login needed.

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

Linux \>= 83e733161fde43e2f99cefa68e369944460fce39, \< 967faa26f313a62e7bebc55d5b8122eaee43b929; \>= 83e733161fde43e2f99cefa68e369944460fce39, \< 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a; Linux 6.9.

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

Yes. Fixed in Linux 967faa26f313a62e7bebc55d5b8122eaee43b929, Linux 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a. Upgrade Linux to 8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a or later.

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

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/967faa26f313a62e7bebc55d5b8122eaee43b929>
- patch: <https://git.kernel.org/stable/c/8dd91e8d31febf4d9cca3ae1bb4771d33ae7ee5a>

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

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