CVE-2021-47168 NFS: fix an incorrect limit in filelayout_decode_layout()

Critical 9.8 Published Updated

An incorrect size limit in the Linux kernel NFS file layout decoder can cause memory corruption, potentially leading to code execution or system crashes.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-47168?

CVE-2021-47168 is a critical memory corruption vulnerability in Linux kernel, published on 25 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

NFS: fix an incorrect limit in filelayout_decode_layout()

The "sizeof(struct nfs_fh)" is two bytes too large and could lead to memory corruption. It should be NFS_MAXFHSIZE because that's the size of the ->data[] buffer.

I reversed the size of the arguments to put the variable on the left.

Weakness: CWE-787

Which versions are affected by CVE-2021-47168?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2021-47168?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2021-47168 being exploited?

There is no known exploitation of CVE-2021-47168 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2021-47168, GHSA-8229-hhm6-4mmc, UBUNTU-CVE-2021-47168.

Is CVE-2021-47168 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free