CVE-2024-26878 quota: Fix potential NULL pointer dereference

Medium 4.7 Published Updated

A race condition in the Linux kernel quota subsystem can lead to a NULL pointer dereference, causing a system crash.

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

CVE-2024-26878 is a medium-severity vulnerability in Debian Debian Linux, published on 17 Apr 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:

quota: Fix potential NULL pointer dereference

Below race may cause NULL pointer dereference

P1 P2 dquot_free_inode quota_off drop_dquot_ref remove_dquot_ref dquots = i_dquot(inode) dquots = i_dquot(inode) srcu_read_lock dquots[cnt]) != NULL (1) dquots[type] = NULL (2) spin_lock(&dquots[cnt]->dq_dqb_lock) (3) ....

If dquot_free_inode(or other routines) checks inode's quota pointers (1) before quota_off sets it to NULL(2) and use it (3) after that, NULL pointer dereference will be triggered.

So let's fix it by using a temporary pointer to avoid this issue.

Weakness: CWE-476, CWE-362

Which versions are affected by CVE-2024-26878?

It affects 2 products.

Products include Debian Debian Linux, Linux kernel.

How do I fix CVE-2024-26878?

Apply the vendor's patch.

Is CVE-2024-26878 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as BELL-CVE-2024-26878, DEBIAN-CVE-2024-26878, GHSA-jg7c-h6xh-f8hr, UBUNTU-CVE-2024-26878.

Is CVE-2024-26878 in your software?

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

Check your SBOMs for free