CVE-2024-50202 nilfs2: propagate directory read errors from nilfs_find_entry()

Medium 5.5 Published Updated

A flaw in the nilfs2 filesystem driver causes a task hang and denial of service when handling corrupted directory entries.

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-50202?

CVE-2024-50202 is a medium-severity denial of service vulnerability in Linux kernel, published on 8 Nov 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:

nilfs2: propagate directory read errors from nilfs_find_entry()

Syzbot reported that a task hang occurs in vcs_open() during a fuzzing test for nilfs2.

The root cause of this problem is that in nilfs_find_entry(), which searches for directory entries, ignores errors when loading a directory page/folio via nilfs_get_folio() fails.

If the filesystem images is corrupted, and the i_size of the directory inode is large, and the directory page/folio is successfully read but fails the sanity check, for example when it is zero-filled, nilfs_check_folio() may continue to spit out error messages in bursts.

Fix this issue by propagating the error to the callers when loading a page/folio fails in nilfs_find_entry().

The current interface of nilfs_find_entry() and its callers is outdated and cannot propagate error codes such as -EIO and -ENOMEM returned via nilfs_find_entry(), so fix it together.

Weakness: CWE-755

Which versions are affected by CVE-2024-50202?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-50202?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-50202 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-53241, AZL-53286, BELL-CVE-2024-50202, DEBIAN-CVE-2024-50202, GHSA-p87g-j8m4-pq52, UBUNTU-CVE-2024-50202.

Is CVE-2024-50202 in your software?

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

Check your SBOMs for free