CVE-2021-47506

nfsd: fix use-after-free due to delegation race

HIGH
7.8
CVSS Score
Published: May 24, 2024 at 03:01 PM UTC
Updated: August 5, 2026 at 09:24 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.8%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: nfsd: fix use-after-free due to delegation race A delegation break could arrive as soon as we've called vfs_setlease. A delegation break runs a callback which immediately (in nfsd4_cb_recall_prepare) adds the delegation to del_recall_lru. If we then exit nfs4_set_delegation without hashing the delegation, it will be freed as soon as the callback is done with it, without ever being removed from del_recall_lru. Symptoms show up later as use-after-free or list corruption warnings, usually in the laundromat thread. I suspect aba2072f4523 "nfsd: grant read delegations to clients holding writes" made this bug easier to hit, but I looked as far back as v3.0 and it looks to me it already had the same problem. So I'm not sure where the bug was introduced; it may have been there from the beginning.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.4.2963.17 ≤ v < 4.14.2593.17 ≤ v < 4.19.2223.17 ≤ v < 4.4.2963.17 ≤ v < 4.9.2943.17 ≤ v < 5.10.853.17 ≤ v < 5.15.83.17 ≤ v < 5.163.17 ≤ v < 5.4.1684.10 ≤ v < 4.14.2594.15 ≤ v < 4.19.2224.20 ≤ v < 5.4.1684.5 ≤ v < 4.9.2945.11 ≤ v < 5.15.85.5 ≤ v < 5.10.855.15 rc15.15 rc25.15 rc35.15 rc4dff1399f8addf7129c49bb2227469da79cc30b47
Vendor states this is fixed in 04a8d07f3d58308b92630045560799a3faa3ebce (fixed)
Vendor states this is fixed in 148c816f10fd11df27ca6a9b3238cdd42fa72cd3 (fixed)
Vendor states this is fixed in 2becaa990b93cbd2928292c0b669d3abb6cf06d4 (fixed)
Vendor states this is fixed in 33645d3e22720cac1e4548f8fef57bf0649536ee (fixed)
Vendor states this is fixed in 348714018139c39533c55661a0c7c990671396b4 (fixed)
Vendor states this is fixed in 548ec0805c399c65ed66c6641be467f717833ab5 (fixed)
Vendor states this is fixed in e0759696de6851d7536efddfdd2dfed4c4df1f09 (fixed)
Vendor states this is fixed in eeb0711801f5e19ef654371b627682aed3b11373 (fixed)
Vendor states this is fixed in 3.17 (unaffected)
Vendor states this is fixed in 4.14.259 (unaffected)
Vendor states this is fixed in 4.19.222 (unaffected)
Vendor states this is fixed in 4.4.296 (unaffected)
Vendor states this is fixed in 4.9.294 (unaffected)
Vendor states this is fixed in 5.10.85 (unaffected)
Vendor states this is fixed in 5.15.8 (unaffected)
Vendor states this is fixed in 5.16 (unaffected)
Vendor states this is fixed in 5.4.168 (unaffected)

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/04a8d07f3d58308b92630045560799a3faa3ebce
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/148c816f10fd11df27ca6a9b3238cdd42fa72cd3
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2becaa990b93cbd2928292c0b669d3abb6cf06d4
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/33645d3e22720cac1e4548f8fef57bf0649536ee
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/348714018139c39533c55661a0c7c990671396b4
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/548ec0805c399c65ed66c6641be467f717833ab5
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e0759696de6851d7536efddfdd2dfed4c4df1f09
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/eeb0711801f5e19ef654371b627682aed3b11373

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card