CVE-2021-47506
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel | Amazon Linux | 4.14.262-200.489.amzn2 |
| kernel-devel | Amazon Linux | 4.14.262-200.489.amzn2 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | dff1399f8addf7129c49bb2227469da79cc30b47, dff1399f8addf7129c49bb2227469da79cc30b47, dff1399f8addf7129c49bb2227469da79cc30b47 |
| Linux | Linux | 3.17, 0, 4.4.296 |
| amazon:2 | kernel | 0 |
| amazon:2 | kernel-devel | 0 |
| Linux | Linux | 5.4.168, *, 3.17 |
| amazon:2 | kernel-headers | 0 |
| amazon:2 | python-perf | 0 |
| amazon:2 | kernel-tools-devel | 0 |
| amazon:2 | perf | 0 |
| amazon:2 | kernel-livepatch-4.14.262-200.489 | 0 |
| amazon:2 | kernel-tools | 0 |
| linux | linux_kernel | 3.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