CVE-2024-39276: ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find()
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.
Security readout for executives and security teams
Plain-English summary
This is a Linux kernel ext4 filesystem bug. Under an out-of-memory error path, ext4 can leak an internal cache reference and later trigger a kernel warning during filesystem shutdown. It requires local access and low privileges. No provided source shows active exploitation.
Executive priority
Treat as a moderate Linux maintenance priority. It is not KEV-listed and needs local access, but kernel flaws on shared or multi-tenant systems deserve timely patching through normal update channels.
Technical view
In ext4_xattr_block_cache_find(), __entry_find() increments mb_cache_entry e_refcnt. If ext4_sb_bread() returns -ENOMEM, that reference was not released, causing an mb_cache reference leak and mb_cache_destroy() warning. The fix adds mb_cache_entry_put() on that error branch.
Likely exposure
Systems running affected Linux kernel versions with ext4 support are in scope, especially hosts where local low-privileged users or workloads can exercise ext4 extended-attribute paths. The source lists affected Linux version lines including 5.0 and stable series before listed fixes.
Exploitation context
KEV is false, and the provided sources do not report exploitation in the wild. The issue was reported by syzbot. CVSS marks local access, low complexity, low privileges, no user interaction, and high confidentiality impact, but the source bundle does not explain a data exposure mechanism.
Researcher notes
The public description is narrow: a reference-count leak on an -ENOMEM path in ext4 xattr cache lookup. The CVSS confidentiality rating is high, but the supplied evidence only details the leak and warning, not an exploitation chain.
Mitigation direction
Update to a Linux kernel containing the referenced stable fix for your maintained branch.
Use distribution kernel advisories and packages rather than manually selecting upstream commits.
Prioritize multi-user systems, shared compute, containers, and hosts running untrusted local workloads.
If immediate update is unavailable, reduce untrusted local shell or workload access where practical.
Validation and detection
Inventory Linux kernel versions across servers, desktops, appliances, and container hosts.
Confirm each kernel branch includes the applicable referenced stable commit or vendor backport.
Identify systems using ext4 filesystems and extended attributes in local-user contexts.
Review vendor security advisories for CVE-2024-39276 package status and fixed build numbers.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2024-39276 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.