CVE-2024-42304
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
17/08/2024
Last modified:
03/11/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
ext4: make sure the first directory block is not a hole<br />
<br />
The syzbot constructs a directory that has no dirblock but is non-inline,<br />
i.e. the first directory block is a hole. And no errors are reported when<br />
creating files in this directory in the following flow.<br />
<br />
ext4_mknod<br />
...<br />
ext4_add_entry<br />
// Read block 0<br />
ext4_read_dirblock(dir, block, DIRENT)<br />
bh = ext4_bread(NULL, inode, block, 0)<br />
if (!bh && (type == INDEX || type == DIRENT_HTREE))<br />
// The first directory block is a hole<br />
// But type == DIRENT, so no error is reported.<br />
<br />
After that, we get a directory block without &#39;.&#39; and &#39;..&#39; but with a valid<br />
dentry. This may cause some code that relies on dot or dotdot (such as<br />
make_indexed_dir()) to crash.<br />
<br />
Therefore when ext4_read_dirblock() finds that the first directory block<br />
is a hole report that the filesystem is corrupted and return an error to<br />
avoid loading corrupted data from disk causing something bad.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.9.187 (including) | 4.10 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.14.135 (including) | 4.15 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 4.19.62 (including) | 4.19.320 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.1.21 (including) | 5.2 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.2.4 (including) | 5.4.282 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.5 (including) | 5.10.224 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.11 (including) | 5.15.165 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.103 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.6.44 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.10.3 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/299bc6ffa57e04e74c6cce866d6c0741fb4897a1
- 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/d81d7e347d1f1f48a5634607d39eb90c161c8afe
- https://git.kernel.org/stable/c/de2a011a13a46468a6e8259db58b1b62071fe136
- https://git.kernel.org/stable/c/e02f9941e8c011aa3eafa799def6a134ce06bcfa
- https://git.kernel.org/stable/c/f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6
- https://lists.debian.org/debian-lts-announce/2024/10/msg00003.html
- https://lists.debian.org/debian-lts-announce/2025/01/msg00001.html



