CVE-2024-57927 nfs: Fix oops in nfs_netfs_init_request() when copying to cache

Medium 5.5 Published Updated

A null pointer dereference in the Linux kernel NFS module causes a system crash when copying data to cache, leading to denial of service.

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-2024-57927?

CVE-2024-57927 is a medium-severity vulnerability in Linux kernel, published on 19 Jan 2025. 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 oops in nfs_netfs_init_request() when copying to cache

When netfslib wants to copy some data that has just been read on behalf of nfs, it creates a new write request and calls nfs_netfs_init_request() to initialise it, but with a NULL file pointer. This causes nfs_file_open_context() to oops - however, we don't actually need the nfs context as we're only going to write to the cache.

Fix this by just returning if we aren't given a file pointer and emit a warning if the request was for something other than copy-to-cache.

Further, fix nfs_netfs_free_request() so that it doesn't try to free the context if the pointer is NULL.

Weakness: CWE-476

Which versions are affected by CVE-2024-57927?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-57927?

Apply the vendor's patch.

Is CVE-2024-57927 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-57927, DEBIAN-CVE-2024-57927, GHSA-j58h-ppm8-rm4x, UBUNTU-CVE-2024-57927.

Is CVE-2024-57927 in your software?

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

Check your SBOMs for free