CVE-2024-39276: ext4: fix mb_cache_entry's e_refcnt leak in ext4_xattr_block_cache_find()

Published Jun 25, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ext4: fix mbcacheentry's erefcnt leak in ext4xattrblockcachefind()

Syzbot reports a warning as follows:

============================================ WARNING: CPU: 0 PID: 5075 at fs/mbcache.c:419 mbcachedestroy+0x224/0x290 Modules linked in: CPU: 0 PID: 5075 Comm: syz-executor199 Not tainted 6.9.0-rc6-gb947cc5bf6d7 RIP: 0010:mbcachedestroy+0x224/0x290 fs/mbcache.c:419 Call Trace: ext4putsuper+0x6d4/0xcd0 fs/ext4/super.c:1375 genericshutdownsuper+0x136/0x2d0 fs/super.c:641 killblocksuper+0x44/0x90 fs/super.c:1675 ext4killsb+0x68/0xa0 fs/ext4/super.c:7327 [...] ============================================

This is because when finding an entry in ext4xattrblockcachefind(), if ext4sbbread() returns -ENOMEM, the ce's erefcnt, which has already grown in the entryfind(), won't be put away, and eventually trigger the above issue in mbcachedestroy() due to reference count leakage.

So call mbcacheentryput() on the -ENOMEM error branch as a quick fix.

Other sources

In the Linux kernel, the following vulnerability has been resolved:

ext4: fix mbcacheentry's erefcnt leak in ext4xattrblockcachefind()

Syzbot reports a warning as follows:

============================================ WARNING: CPU: 0 PID: 5075 at fs/mbcache.c:419 mbcachedestroy+0x224/0x290 Modules linked in: CPU: 0 PID: 5075 Comm: syz-executor199 Not tainted 6.9.0-rc6-gb947cc5bf6d7 RIP: 0010:mbcachedestroy+0x224/0x290 fs/mbcache.c:419 Call Trace: <TASK> ext4putsuper+0x6d4/0xcd0 fs/ext4/super.c:1375 genericshutdownsuper+0x136/0x2d0 fs/super.c:641 killblocksuper+0x44/0x90 fs/super.c:1675 ext4killsb+0x68/0xa0 fs/ext4/super.c:7327 [...] ============================================

This is because when finding an entry in ext4xattrblockcachefind(), if ext4sbbread() returns -ENOMEM, the ce's erefcnt, which has already grown in the entryfind(), won't be put away, and eventually trigger the above issue in mbcachedestroy() due to reference count leakage.

So call mbcacheentryput() on the -ENOMEM error branch as a quick fix.

NVD

In the Linux kernel, the following vulnerability has been resolved:

ext4: fix mbcacheentry&#39;s erefcnt leak in ext4xattrblockcachefind()

The Linux kernel CVE team has assigned CVE-2024-39276 to this issue.

Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024062548-CVE-2024-39276-5205@gregkh/T

Red Hat

Affected Software

20 affected componentsFixes available
redhat/kernel<4.19.316
4.19.316
redhat/kernel<5.4.278
5.4.278
redhat/kernel<5.10.219
5.10.219
redhat/kernel<5.15.161
5.15.161
redhat/kernel<6.1.94
6.1.94
redhat/kernel<6.6.34
6.6.34
redhat/kernel<6.9.5
6.9.5
redhat/kernel<6.10
6.10
Linux Linux kernel>=4.14.92<4.15
Linux Linux kernel>=4.19.14<4.19.316
Linux Linux kernel>=4.20.1<=5.4.278
Linux Linux kernel>=5.5<=5.15.161
Linux Linux kernel>=5.16<=6.1.94
Linux Linux kernel>=6.2<=6.6.34
Linux Linux kernel>=6.7<=6.9.5
IBM Security Verify Governance<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Software Stack<=ISVG 10.0.2
IBM Security Verify Governance, Identity Manager Virtual Appliance<=ISVG 10.0.2
IBM Security Verify Governance Identity Manager Container<=ISVG 10.0.2
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1

Event History

Jun 25, 2024
CVE Published
via MITRE·02:22 PM
Data Sourced
via MITRE·02:22 PM
Description
Apr 27, 2025
Data Sourced
via Ubuntu·12:31 AM
RemedyDescriptionSeverityAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-39276?

CVE-2024-39276 is classified as a medium severity vulnerability in the Linux kernel due to the potential for an e_refcnt leak.

2

How do I fix CVE-2024-39276?

To fix CVE-2024-39276, upgrade to the recommended versions of the Linux kernel which include patches for this vulnerability.

3

What systems are affected by CVE-2024-39276?

CVE-2024-39276 affects various versions of the Linux kernel including specific versions from Red Hat and Debian distributions.

4

Is there a workaround for CVE-2024-39276?

There are no known workarounds for CVE-2024-39276; the recommended action is to apply the kernel updates provided.

5

What are the impacts of CVE-2024-39276 if left unpatched?

If left unpatched, CVE-2024-39276 could potentially lead to data integrity issues due to the e_refcnt leak in the ext4 file system.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203