VDB

CVE-2021-47506

CVE-2021-47506 PUBLISHED CVSS 9.8 CRITICAL

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

Reported by linux · Published May 24, 2024

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernelAmazon Linux4.14.262-200.489.amzn2
kernel-develAmazon Linux4.14.262-200.489.amzn2

Risk scores

CVSS 3.1
9.8
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinuxdff1399f8addf7129c49bb2227469da79cc30b47, dff1399f8addf7129c49bb2227469da79cc30b47, dff1399f8addf7129c49bb2227469da79cc30b47
LinuxLinux3.17, 0, 4.4.296
amazon:2kernel0
amazon:2kernel-devel0
LinuxLinux5.4.168, *, 3.17
amazon:2kernel-headers0
amazon:2python-perf0
amazon:2kernel-tools-devel0
amazon:2perf0
amazon:2kernel-livepatch-4.14.262-200.4890
amazon:2kernel-tools0
linuxlinux_kernel3.17, 3.17, 3.17

Timeline

  • May 24, 2024 CVE Published
  • May 25, 2024 EPSS Score (30 in total, the first dated here)
  • Jul 13, 2026 Coalition ESS Score
  • Aug 10, 2026 Distribution Patch (61 in total, the first dated here)
  • Aug 10, 2026 Security Advisory (81 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-47506
vulnetix vdb fixes CVE-2021-47506

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-47506/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›