CVE-2024-42304
ext4: make sure the first directory block is not a hole
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= 3a17ca864baffc0c6f6e8aad525aa4365775a193, < d81d7e347d1f1f48a5634607d39eb90c161c8afe; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < e02f9941e8c011aa3eafa799def6a134ce06bcfa; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < de2a011a13a46468a6e8259db58b1b62071fe136; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < 9771e3d8365ae1dd5e8846a204cb9af14e3e656a; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < b609753cbbd38f8c0affd4956c0af178348523ac; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < c3893d9de8ee153baac56d127d844103488133b5; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < 299bc6ffa57e04e74c6cce866d6c0741fb4897a1; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6; 3f0307b0d2d8b333a6964fc4c820dc86896fd1cf; 514631c2225c1fd556c799cc1893fb27b0f48f00; …
- Anyone running Linux 5.3
Vulnerability facts
- Affected
- Linux >= 3a17ca864baffc0c6f6e8aad525aa4365775a193, < d81d7e347d1f1f48a5634607d39eb90c161c8afe; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < e02f9941e8c011aa3eafa799def6a134ce06bcfa; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < de2a011a13a46468a6e8259db58b1b62071fe136; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < 9771e3d8365ae1dd5e8846a204cb9af14e3e656a; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < b609753cbbd38f8c0affd4956c0af178348523ac; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < c3893d9de8ee153baac56d127d844103488133b5; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < 299bc6ffa57e04e74c6cce866d6c0741fb4897a1; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6; 3f0307b0d2d8b333a6964fc4c820dc86896fd1cf; 514631c2225c1fd556c799cc1893fb27b0f48f00; …; Linux 5.3
- Fixed in
- Linux 9771e3d8365ae1dd5e8846a204cb9af14e3e656a, Linux 299bc6ffa57e04e74c6cce866d6c0741fb4897a1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- EPSS
- 0.34% chance of exploitation in 30 days (percentile 20, 2026-11-26)
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: ext4: make sure the first directory block is not a hole The syzbot constructs a directory that has no dirblock but is non-inline, i.e. the first directory block is a hole. And no errors are reported when creating files in this directory in the following flow. ext4_mknod ... ext4_add_entry // Read block 0 ext4_read_dirblock(dir, block, DIRENT) bh = ext4_bread(NULL, inode, block, 0) if (!bh && (type == INDEX || type == DIRENT_HTREE)) // The first directory block is a hole // But type == DIRENT, so no error is reported. After that, we get a directory block without '.' and '..' but with a valid dentry. This may cause some code that relies on dot or dotdot (such as make_indexed_dir()) to crash. Therefore when ext4_read_dirblock() finds that the first directory block is a hole report that the filesystem is corrupted and return an error to avoid loading corrupted data from disk causing something bad.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 3a17ca864baffc0c6f6e8aad525aa4365775a193, < d81d7e347d1f1f48a5634607d39eb90c161c8afe; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < e02f9941e8c011aa3eafa799def6a134ce06bcfa; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < de2a011a13a46468a6e8259db58b1b62071fe136; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < 9771e3d8365ae1dd5e8846a204cb9af14e3e656a; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < b609753cbbd38f8c0affd4956c0af178348523ac; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < c3893d9de8ee153baac56d127d844103488133b5; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < 299bc6ffa57e04e74c6cce866d6c0741fb4897a1; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6; 3f0307b0d2d8b333a6964fc4c820dc86896fd1cf; 514631c2225c1fd556c799cc1893fb27b0f48f00; … | — | cvelist |
| Linux | 5.3 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-42304. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-42304.md Affected: Linux >= 3a17ca864baffc0c6f6e8aad525aa4365775a193, < d81d7e347d1f1f48a5634607d39eb90c161c8afe; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < e02f9941e8c011aa3eafa799def6a134ce06bcfa; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < de2a011a13a46468a6e8259db58b1b62071fe136; >= 4e19d6b65fb4fc42e352ce9… Fixed in: Linux 9771e3d8365ae1dd5e8846a204cb9af14e3e656a, Linux 299bc6ffa57e04e74c6cce866d6c0741fb4897a1 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.
References
Patches
- https://git.kernel.org/stable/c/d81d7e347d1f1f48a5634607d39eb90c161c8afe
- https://git.kernel.org/stable/c/e02f9941e8c011aa3eafa799def6a134ce06bcfa
- https://git.kernel.org/stable/c/de2a011a13a46468a6e8259db58b1b62071fe136
- https://git.kernel.org/stable/c/9771e3d8365ae1dd5e8846a204cb9af14e3e656a
- https://git.kernel.org/stable/c/b609753cbbd38f8c0affd4956c0af178348523ac
- https://git.kernel.org/stable/c/c3893d9de8ee153baac56d127d844103488133b5
- https://git.kernel.org/stable/c/299bc6ffa57e04e74c6cce866d6c0741fb4897a1
- https://git.kernel.org/stable/c/f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6
FAQ
Is CVE-2024-42304 being exploited?
There is no confirmed exploitation: CVE-2024-42304 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.34% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-42304?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2024-42304?
Linux >= 3a17ca864baffc0c6f6e8aad525aa4365775a193, < d81d7e347d1f1f48a5634607d39eb90c161c8afe; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < e02f9941e8c011aa3eafa799def6a134ce06bcfa; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < de2a011a13a46468a6e8259db58b1b62071fe136; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < 9771e3d8365ae1dd5e8846a204cb9af14e3e656a; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < b609753cbbd38f8c0affd4956c0af178348523ac; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < c3893d9de8ee153baac56d127d844103488133b5; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < 299bc6ffa57e04e74c6cce866d6c0741fb4897a1; >= 4e19d6b65fb4fc42e352ce9883649e049da14743, < f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6; 3f0307b0d2d8b333a6964fc4c820dc86896fd1cf; 514631c2225c1fd556c799cc1893fb27b0f48f00; …; Linux 5.3.
Is there a fix for CVE-2024-42304?
Yes. Fixed in Linux 9771e3d8365ae1dd5e8846a204cb9af14e3e656a, Linux 299bc6ffa57e04e74c6cce866d6c0741fb4897a1. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2024-42304?
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.