CVE-2024-39276
Linux Kernel Ext4 MBCache Reference Count Leak
Description
In the Linux kernel, the following vulnerability has been resolved: ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find() Syzbot reports a warning as follows: ============================================ WARNING: CPU: 0 PID: 5075 at fs/mbcache.c:419 mb_cache_destroy+0x224/0x290 Modules linked in: CPU: 0 PID: 5075 Comm: syz-executor199 Not tainted 6.9.0-rc6-gb947cc5bf6d7 RIP: 0010:mb_cache_destroy+0x224/0x290 fs/mbcache.c:419 Call Trace: <TASK> ext4_put_super+0x6d4/0xcd0 fs/ext4/super.c:1375 generic_shutdown_super+0x136/0x2d0 fs/super.c:641 kill_block_super+0x44/0x90 fs/super.c:1675 ext4_kill_sb+0x68/0xa0 fs/ext4/super.c:7327 [...] ============================================ This is because when finding an entry in ext4_xattr_block_cache_find(), if ext4_sb_bread() returns -ENOMEM, the ce's e_refcnt, which has already grown in the __entry_find(), won't be put away, and eventually trigger the above issue in mb_cache_destroy() due to reference count leakage. So call mb_cache_entry_put() on the -ENOMEM error branch as a quick fix.
INFO
Published Date :
June 25, 2024, 3:15 p.m.
Last Modified :
March 24, 2025, 5:28 p.m.
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Remotely Exploitable :
No
Impact Score :
3.6
Exploitability Score :
1.8
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-39276
.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-39276
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-39276
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Mar. 24, 2025
Action Type Old Value New Value Added CWE NVD-CWE-Other Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.14.92 up to (excluding) 4.15 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.19.14 up to (excluding) 4.19.316 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 4.20.1 up to (including) 5.4.278 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (including) 6.1.94 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.5 up to (including) 5.15.161 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (including) 6.6.34 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (including) 6.9.5 Added Reference Type CVE: https://git.kernel.org/stable/c/0c0b4a49d3e7f49690a6827a41faeffad5df7e21 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/0c0b4a49d3e7f49690a6827a41faeffad5df7e21 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/681ff9a09accd8a4379f8bd30b7a1641ee19bb3e Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/681ff9a09accd8a4379f8bd30b7a1641ee19bb3e Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/76dc776153a47372719d664e0fc50d6355791abb Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/76dc776153a47372719d664e0fc50d6355791abb Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/896a7e7d0d555ad8b2b46af0c2fa7de7467f9483 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/896a7e7d0d555ad8b2b46af0c2fa7de7467f9483 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/9ad75e78747b5a50dc5a52f0f8e92e920a653f16 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/9ad75e78747b5a50dc5a52f0f8e92e920a653f16 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/a95df6f04f2c37291adf26a74205cde0314d4577 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/a95df6f04f2c37291adf26a74205cde0314d4577 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/b37c0edef4e66fb21a2fbc211471195a383e5ab8 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/b37c0edef4e66fb21a2fbc211471195a383e5ab8 Types: Patch Added Reference Type CVE: https://git.kernel.org/stable/c/e941b712e758f615d311946bf98216e79145ccd9 Types: Patch Added Reference Type kernel.org: https://git.kernel.org/stable/c/e941b712e758f615d311946bf98216e79145ccd9 Types: Patch -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://git.kernel.org/stable/c/0c0b4a49d3e7f49690a6827a41faeffad5df7e21 Added Reference https://git.kernel.org/stable/c/681ff9a09accd8a4379f8bd30b7a1641ee19bb3e Added Reference https://git.kernel.org/stable/c/76dc776153a47372719d664e0fc50d6355791abb Added Reference https://git.kernel.org/stable/c/896a7e7d0d555ad8b2b46af0c2fa7de7467f9483 Added Reference https://git.kernel.org/stable/c/9ad75e78747b5a50dc5a52f0f8e92e920a653f16 Added Reference https://git.kernel.org/stable/c/a95df6f04f2c37291adf26a74205cde0314d4577 Added Reference https://git.kernel.org/stable/c/b37c0edef4e66fb21a2fbc211471195a383e5ab8 Added Reference https://git.kernel.org/stable/c/e941b712e758f615d311946bf98216e79145ccd9 -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Nov. 05, 2024
Action Type Old Value New Value Added CVSS V3.1 CISA-ADP AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N -
CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 25, 2024
Action Type Old Value New Value Added Description In the Linux kernel, the following vulnerability has been resolved: ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find() Syzbot reports a warning as follows: ============================================ WARNING: CPU: 0 PID: 5075 at fs/mbcache.c:419 mb_cache_destroy+0x224/0x290 Modules linked in: CPU: 0 PID: 5075 Comm: syz-executor199 Not tainted 6.9.0-rc6-gb947cc5bf6d7 RIP: 0010:mb_cache_destroy+0x224/0x290 fs/mbcache.c:419 Call Trace: <TASK> ext4_put_super+0x6d4/0xcd0 fs/ext4/super.c:1375 generic_shutdown_super+0x136/0x2d0 fs/super.c:641 kill_block_super+0x44/0x90 fs/super.c:1675 ext4_kill_sb+0x68/0xa0 fs/ext4/super.c:7327 [...] ============================================ This is because when finding an entry in ext4_xattr_block_cache_find(), if ext4_sb_bread() returns -ENOMEM, the ce's e_refcnt, which has already grown in the __entry_find(), won't be put away, and eventually trigger the above issue in mb_cache_destroy() due to reference count leakage. So call mb_cache_entry_put() on the -ENOMEM error branch as a quick fix. Added Reference kernel.org https://git.kernel.org/stable/c/9ad75e78747b5a50dc5a52f0f8e92e920a653f16 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/896a7e7d0d555ad8b2b46af0c2fa7de7467f9483 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/76dc776153a47372719d664e0fc50d6355791abb [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/681ff9a09accd8a4379f8bd30b7a1641ee19bb3e [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/e941b712e758f615d311946bf98216e79145ccd9 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/a95df6f04f2c37291adf26a74205cde0314d4577 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/b37c0edef4e66fb21a2fbc211471195a383e5ab8 [No types assigned] Added Reference kernel.org https://git.kernel.org/stable/c/0c0b4a49d3e7f49690a6827a41faeffad5df7e21 [No types assigned]
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-39276
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-39276
weaknesses.