CVE-2024-42304
ext4: make sure the first directory block is not a hole
Reported by linux · Published August 17, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| bpftool | Amazon Linux | 6.1.106-116.188.amzn2023 |
| kernel | Amazon Linux | 6.1.106-116.188.amzn2023 |
| linux_kernel | linux | 6.10.3, 6.6.44, 6.1.103, 5.15.165, 5.10.224, 5.4.282, 5.2, 4.19.320, 4.15, 4.10 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 3a17ca864baffc0c6f6e8aad525aa4365775a193, 4e19d6b65fb4fc42e352ce9883649e049da14743, 4e19d6b65fb4fc42e352ce9883649e049da14743 |
| Linux | Linux | 5.3, 0, 4.19.320 |
| amazon:2023 | bpftool | 0 |
| amazon:2023 | kernel | 0 |
| linux | linux_kernel | 4.19.62, 5.3, 5.2.4 |
| amazon:2023 | python3-perf | 0 |
| amazon:2023 | kernel-tools-devel | 0 |
| Linux | Linux | 5.2.4, 3f0307b0d2d8b333a6964fc4c820dc86896fd1cf, 514631c2225c1fd556c799cc1893fb27b0f48f00 |
| amazon:2023 | kernel-libbpf-devel | 0 |
| amazon:2023 | perf | 0 |
| amazon:2023 | kernel-libbpf-static | 0 |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | 0 |
| amazon:2 | perf | 0 |
| amazon:2023 | kernel-livepatch-6.1.106-116.188 | 0 |
| amazon:2 | kernel-livepatch-4.14.353-270.569 | 0 |
| amazon:2023 | kernel-tools | 0 |
| amazon:2 | kernel-tools | 0 |
| amazon:2 | kernel-tools-devel | 0 |
| amazon:2023 | kernel-devel | 0 |
| amazon:2023 | kernel-modules-extra | 0 |
…and 7 more
Timeline
- Aug 17, 2024 CVE Published
- Aug 18, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (9 in total, the first dated here)
- Dec 16, 2025 PoC Published
- Jan 6, 2026 Security Advisory (142 in total, the first dated here)
- Mar 30, 2026 Distribution Patch (128 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-42304
vulnetix vdb fixes CVE-2024-42304
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-42304/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart