CVE-2024-26878: quota: Fix potential NULL pointer dereference
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 dquotfreeinode quotaoff dropdquotref removedquotref dquots = idquot(inode) dquots = idquot(inode) srcureadlock dquots[cnt]) != NULL (1) dquots[type] = NULL (2) spinlock(&dquots[cnt]->dqdqblock) (3) ....
If dquotfreeinode(or other routines) checks inode's quota pointers (1) before quotaoff 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.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
quota: Fix potential NULL pointer dereference
The Linux kernel CVE team has assigned CVE-2024-26878 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024041740-CVE-2024-26878-5748@gregkh/T
— Red Hat
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-26878?
CVE-2024-26878 has been classified with a medium severity due to a potential NULL pointer dereference in the Linux kernel.
How do I fix CVE-2024-26878?
To fix CVE-2024-26878, update your kernel to version 4.19.311, 5.4.273, 5.10.214, 5.15.153, 6.1.83, or later versions.
What versions of the Linux kernel are affected by CVE-2024-26878?
CVE-2024-26878 affects multiple versions of the Linux kernel prior to 4.19.311, 5.4.273, 5.10.214, 5.15.153, 6.1.83, and others.
Is CVE-2024-26878 specific to any Linux distributions?
CVE-2024-26878 primarily affects the Red Hat and Debian distributions of the Linux kernel.
What type of vulnerability is CVE-2024-26878?
CVE-2024-26878 is a programming vulnerability related to race conditions that can lead to undefined behavior and system crashes.