CVE-2021-47259
NFS: Fix use-after-free in nfs4_init_client()
Check your servers for CVE-2021-47259
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-47259 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
NFS: Fix use-after-free in nfs4_init_client()
KASAN reports a use-after-free when attempting to mount two different exports through two different NICs that belong to the same server.
Olga was able to hit this with kernels starting somewhere between 5.7 and 5.10, but I traced the patch that introduced the clear_bit() call to 4.13. So something must have changed in the refcounting of the clp pointer to make this call to nfs_put_client() the very last one.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- high: an attack depends on conditions outside the control of the attacker, such as a race
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.71%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 54.8% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 22 May 2024):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-416 Use After Free
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 8dcbec6d20eb881ba368d0aebc3a8a678aebb1da, before c7eab9e2d7b4e983ce280276fb920af649955897 affected from 8dcbec6d20eb881ba368d0aebc3a8a678aebb1da, before 42c10b0db064e45f5c5ae7019bbf2168ffab766c affected from 8dcbec6d20eb881ba368d0aebc3a8a678aebb1da, before 3e3c7ebbfac152d08be75c92802a64a1f6471a15 affected from 8dcbec6d20eb881ba368d0aebc3a8a678aebb1da, before c3b6cf64dfe4ef96e7341508d50d6998da7062c7 affected from 8dcbec6d20eb881ba368d0aebc3a8a678aebb1da, before 72651c6579a25317a90536181d311c663d0329ab affected from 8dcbec6d20eb881ba368d0aebc3a8a678aebb1da, before 476bdb04c501fc64bf3b8464ffddefc8dbe01577
Other versions: unaffected
|
| Linux |
affected 4.13 unaffected before 4.13 unaffected from 4.14.237 up to and including 4.14.* unaffected from 4.19.195 up to and including 4.19.* unaffected from 5.4.126 up to and including 5.4.* unaffected from 5.10.44 up to and including 5.10.* unaffected from 5.12.11 up to and including 5.12.* unaffected 5.13 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2021-47259 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2021-47259
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-47259
trivy image --scanners vuln IMAGE | grep CVE-2021-47259
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/c7eab9e2d7b4e983ce280276fb920af649955897 git.kernel.org
- https://git.kernel.org/stable/c/42c10b0db064e45f5c5ae7019bbf2168ffab766c git.kernel.org
- https://git.kernel.org/stable/c/3e3c7ebbfac152d08be75c92802a64a1f6471a15 git.kernel.org
- https://git.kernel.org/stable/c/c3b6cf64dfe4ef96e7341508d50d6998da7062c7 git.kernel.org
- https://git.kernel.org/stable/c/72651c6579a25317a90536181d311c663d0329ab git.kernel.org
- https://git.kernel.org/stable/c/476bdb04c501fc64bf3b8464ffddefc8dbe01577 git.kernel.org
Source: the record CVE-2021-47259 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse