CVE-2021-47259 NFS: Fix use-after-free in nfs4_init_client()
A use-after-free in the Linux kernel NFS client allows attackers to cause denial of service or potentially execute code when mounting exports via multiple NICs.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-47259?
CVE-2021-47259 is a high-severity use after free vulnerability in Linux kernel, published on 21 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-416
Which versions are affected by CVE-2021-47259?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2021-47259?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2021-47259 being exploited?
There is no known exploitation of CVE-2021-47259 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2021-47259, GHSA-w7j7-m99g-gcgq, UBUNTU-CVE-2021-47259.