CVE-2021-47506 in the critical feed json
nfsd: fix use-after-free due to delegation race
published 2024-05-24 2 y ago modified 2026-08-05 3 mo ago also EUVD-2021-34510
- cvss
- 9.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.8%
- EPSS 0.8% chance of exploitation in 30 days, percentile 56%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 4.4.296, 4.9.294, 4.14.259, 4.19.222, 5.4.168, 5.10.85, 5.15.8, 5.16
- linux Debian 14, Debian 13, Debian 12 5.15.15-1
debian advisories DEBIAN-CVE-2021-47506
- linux Ubuntu 18.04 LTS 4.15.0-169.177
- linux Ubuntu 20.04 LTS 5.4.0-105.119
- linux-aws Ubuntu 18.04 LTS 4.15.0-1121.129
- linux-aws Ubuntu 20.04 LTS 5.4.0-1069.73
- linux-gcp Ubuntu 20.04 LTS 5.4.0-1068.72
- linux-ibm Ubuntu 20.04 LTS 5.4.0-1018.20
- linux-kvm Ubuntu 18.04 LTS 4.15.0-1107.109
- linux-kvm Ubuntu 20.04 LTS 5.4.0-1059.62
ubuntu advisories UBUNTU-CVE-2021-47506
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel-64kb SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS, Enterprise Storage 7.1 5.3.18-150300.59.170.1
- kernel-syms SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.170.1
- kernel-source SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.170.1
- kernel-default SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Micro 5.2 +5 more 5.3.18-150300.59.170.1
- kernel-preempt SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.170.1
- kernel-obs-build SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE High Performance Computing 15 SP3-LTSS +1 more 5.3.18-150300.59.170.1
- kernel-default-base SLES for SAP 15 SP3, SLES 15 SP3-LTSS, SLE Micro 5.2 +3 more 5.3.18-150300.59.170.1.150300.18.100.1
- kernel-default SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLE Live Patching 15 SP2 +2 more 5.3.18-150200.24.200.1
suse advisories SUSE-SU-2024:2948-1SUSE-SU-2024:2923-1SUSE-SU-2024:2190-1SUSE-SU-2024:2189-1SUSE-SU-2024:2185-1SUSE-SU-2024:2184-1
- git.kernel.org/stable/c/04a8d07f3d58308b92630045560799a3faa3ebce commit
- git.kernel.org/stable/c/348714018139c39533c55661a0c7c990671396b4 commit
- git.kernel.org/stable/c/33645d3e22720cac1e4548f8fef57bf0649536ee commit
- git.kernel.org/stable/c/2becaa990b93cbd2928292c0b669d3abb6cf06d4 commit
- git.kernel.org/stable/c/e0759696de6851d7536efddfdd2dfed4c4df1f09 commit
- git.kernel.org/stable/c/eeb0711801f5e19ef654371b627682aed3b11373 commit
- git.kernel.org/stable/c/148c816f10fd11df27ca6a9b3238cdd42fa72cd3 commit
- git.kernel.org/stable/c/548ec0805c399c65ed66c6641be467f717833ab5 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-47506 updated cvss 7.8
kernel: nfsd: fix use-after-free due to delegation race
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: no fix planned “Out of support scope”
-
Red Hat Enterprise Linux 8 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +6 moreaffected: no fix planned “Will not fix”
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-core, kernel-tools, python3-perf, +17 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.78% chance of exploitation in the next 30 days, higher than 56% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/04a8d07f3d58308b92630045560799a3faa3ebce
patch
-
git.kernel.org
/stable/c/348714018139c39533c55661a0c7c990671396b4
patch
-
git.kernel.org
/stable/c/33645d3e22720cac1e4548f8fef57bf0649536ee
patch
-
git.kernel.org
/stable/c/2becaa990b93cbd2928292c0b669d3abb6cf06d4
patch
-
git.kernel.org
/stable/c/e0759696de6851d7536efddfdd2dfed4c4df1f09
patch
-
git.kernel.org
/stable/c/eeb0711801f5e19ef654371b627682aed3b11373
patch
-
git.kernel.org
/stable/c/148c816f10fd11df27ca6a9b3238cdd42fa72cd3
patch
-
git.kernel.org
/stable/c/548ec0805c399c65ed66c6641be467f717833ab5
patch
Sources
- CVE List CVE-2021-47506
- NVD CVE-2021-47506
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.