# CVE-2024-39276: ext4: fix mb\_cache\_entry's e\_refcnt leak in ext4\_xattr\_block\_cache\_find()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 17, 2026-11-26)
- **Published:** 2024-06-25T14:22:38.886Z
- **Modified:** 2026-06-17T07:41:37.247Z

## Who should check

- Anyone running Linux \>= b878c8a7f08f0c225b6a46ba1ac867e9c5d17807, \< 9ad75e78747b5a50dc5a52f0f8e92e920a653f16; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 896a7e7d0d555ad8b2b46af0c2fa7de7467f9483; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 76dc776153a47372719d664e0fc50d6355791abb; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 681ff9a09accd8a4379f8bd30b7a1641ee19bb3e; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< e941b712e758f615d311946bf98216e79145ccd9; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< a95df6f04f2c37291adf26a74205cde0314d4577; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< b37c0edef4e66fb21a2fbc211471195a383e5ab8; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 0c0b4a49d3e7f49690a6827a41faeffad5df7e21; 9da1f6d06b7a6d068e68fcfd7cbbf6b586d888e1; 81313ed2c705d958744882a269bf4a5e3ddec95e; …
- Anyone running Linux 5.0

## 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.

## Affected and fixed versions

- Linux: \>= b878c8a7f08f0c225b6a46ba1ac867e9c5d17807, \< 9ad75e78747b5a50dc5a52f0f8e92e920a653f16; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 896a7e7d0d555ad8b2b46af0c2fa7de7467f9483; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 76dc776153a47372719d664e0fc50d6355791abb; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 681ff9a09accd8a4379f8bd30b7a1641ee19bb3e; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< e941b712e758f615d311946bf98216e79145ccd9; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< a95df6f04f2c37291adf26a74205cde0314d4577; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< b37c0edef4e66fb21a2fbc211471195a383e5ab8; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 0c0b4a49d3e7f49690a6827a41faeffad5df7e21; 9da1f6d06b7a6d068e68fcfd7cbbf6b586d888e1; 81313ed2c705d958744882a269bf4a5e3ddec95e; … (cvelist)
- Linux: 5.0 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-39276. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-39276.md
Affected: Linux >= b878c8a7f08f0c225b6a46ba1ac867e9c5d17807, < 9ad75e78747b5a50dc5a52f0f8e92e920a653f16; >= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, < 896a7e7d0d555ad8b2b46af0c2fa7de7467f9483; >= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, < 76dc776153a47372719d664e0fc50d6355791abb; >= fb265c9cb49e2074ddcdd4d…
Fixed in: Linux 9ad75e78747b5a50dc5a52f0f8e92e920a653f16, Linux 896a7e7d0d555ad8b2b46af0c2fa7de7467f9483, Linux 76dc776153a47372719d664e0fc50d6355791abb, Linux 681ff9a09accd8a4379f8bd30b7a1641ee19bb3e, Linux 0c0b4a49d3e7f49690a6827a41faeffad5df7e21

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-39276 being exploited?

There is no confirmed exploitation: CVE-2024-39276 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-39276?

Medium: CVSS 5.5 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-39276?

Linux \>= b878c8a7f08f0c225b6a46ba1ac867e9c5d17807, \< 9ad75e78747b5a50dc5a52f0f8e92e920a653f16; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 896a7e7d0d555ad8b2b46af0c2fa7de7467f9483; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 76dc776153a47372719d664e0fc50d6355791abb; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 681ff9a09accd8a4379f8bd30b7a1641ee19bb3e; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< e941b712e758f615d311946bf98216e79145ccd9; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< a95df6f04f2c37291adf26a74205cde0314d4577; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< b37c0edef4e66fb21a2fbc211471195a383e5ab8; \>= fb265c9cb49e2074ddcdd4de99728aefdd3b3592, \< 0c0b4a49d3e7f49690a6827a41faeffad5df7e21; 9da1f6d06b7a6d068e68fcfd7cbbf6b586d888e1; 81313ed2c705d958744882a269bf4a5e3ddec95e; …; Linux 5.0.

### Is there a fix for CVE-2024-39276?

Yes. Fixed in Linux 9ad75e78747b5a50dc5a52f0f8e92e920a653f16, Linux 896a7e7d0d555ad8b2b46af0c2fa7de7467f9483, Linux 76dc776153a47372719d664e0fc50d6355791abb, Linux 681ff9a09accd8a4379f8bd30b7a1641ee19bb3e, Linux 0c0b4a49d3e7f49690a6827a41faeffad5df7e21. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-39276?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/9ad75e78747b5a50dc5a52f0f8e92e920a653f16>
- patch: <https://git.kernel.org/stable/c/896a7e7d0d555ad8b2b46af0c2fa7de7467f9483>
- patch: <https://git.kernel.org/stable/c/76dc776153a47372719d664e0fc50d6355791abb>
- patch: <https://git.kernel.org/stable/c/681ff9a09accd8a4379f8bd30b7a1641ee19bb3e>
- patch: <https://git.kernel.org/stable/c/e941b712e758f615d311946bf98216e79145ccd9>
- patch: <https://git.kernel.org/stable/c/a95df6f04f2c37291adf26a74205cde0314d4577>
- patch: <https://git.kernel.org/stable/c/b37c0edef4e66fb21a2fbc211471195a383e5ab8>
- patch: <https://git.kernel.org/stable/c/0c0b4a49d3e7f49690a6827a41faeffad5df7e21>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-39276>

HTML: <https://flawdb.com/CVE-2024-39276> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-39276>
