CVE-2024-26878

Severity CVSS v4.0:
Pending analysis
Type:
CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
17/04/2024
Last modified:
14/01/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> quota: Fix potential NULL pointer dereference<br /> <br /> Below race may cause NULL pointer dereference<br /> <br /> P1 P2<br /> dquot_free_inode quota_off<br /> drop_dquot_ref<br /> remove_dquot_ref<br /> dquots = i_dquot(inode)<br /> dquots = i_dquot(inode)<br /> srcu_read_lock<br /> dquots[cnt]) != NULL (1)<br /> dquots[type] = NULL (2)<br /> spin_lock(&amp;dquots[cnt]-&gt;dq_dqb_lock) (3)<br /> ....<br /> <br /> If dquot_free_inode(or other routines) checks inode&amp;#39;s quota pointers (1)<br /> before quota_off sets it to NULL(2) and use it (3) after that, NULL pointer<br /> dereference will be triggered.<br /> <br /> So let&amp;#39;s fix it by using a temporary pointer to avoid this issue.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.19.311 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.4.273 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5 (including) 5.10.214 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.153 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.1.83 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.6.23 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.7.11 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.8 (including) 6.8.2 (excluding)
cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*