CVE-2021-47259

NFS: Fix use-after-free in nfs4_init_client()

HIGH
7.8
CVSS Score
Published: May 21, 2024 at 02:19 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.7%
SSVC
No known exploit

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.

Affected

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

4.13 ≤ v < 4.14.2374.13 ≤ v < 4.19.1954.13 ≤ v < 5.10.444.13 ≤ v < 5.12.114.13 ≤ v < 5.134.13 ≤ v < 5.4.1264.15 ≤ v < 4.19.1954.20 ≤ v < 5.4.1265.11 ≤ v < 5.12.115.5 ≤ v < 5.10.445.13 rc15.13 rc25.13 rc35.13 rc45.13 rc58dcbec6d20eb8dcbec6d20eb881ba368d0aebc3a8a678aebb1da
Vendor states this is fixed in 3e3c7ebbfac152d08be75c92802a64a1f6471a15 (fixed)
Vendor states this is fixed in 42c10b0db064e45f5c5ae7019bbf2168ffab766c (fixed)
Vendor states this is fixed in 476bdb04c501 (fixed)
Vendor states this is fixed in 476bdb04c501fc64bf3b8464ffddefc8dbe01577 (fixed)
Vendor states this is fixed in 72651c6579a25317a90536181d311c663d0329ab (fixed)
Vendor states this is fixed in c3b6cf64dfe4ef96e7341508d50d6998da7062c7 (fixed)
Vendor states this is fixed in c7eab9e2d7b4e983ce280276fb920af649955897 (fixed)
Vendor states this is fixed in 4.13 (unaffected)
Vendor states this is fixed in 4.14.237 (unaffected)
Vendor states this is fixed in 4.19.195 (unaffected)
Vendor states this is fixed in 5.10.44 (unaffected)
Vendor states this is fixed in 5.12.11 (unaffected)
Vendor states this is fixed in 5.13 (unaffected)
Vendor states this is fixed in 5.4.126 (unaffected)

References (6)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3e3c7ebbfac152d08be75c92802a64a1f6471a15
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/42c10b0db064e45f5c5ae7019bbf2168ffab766c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/476bdb04c501fc64bf3b8464ffddefc8dbe01577
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/72651c6579a25317a90536181d311c663d0329ab
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c3b6cf64dfe4ef96e7341508d50d6998da7062c7
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c7eab9e2d7b4e983ce280276fb920af649955897

SSVC — Action Prioritization

SSVCNo known exploitNot automatableTotal impact

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

CVSS

7.8HIGHLinux
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