VDB

CVE-2024-42304

CVE-2024-42304 PUBLISHED CVSS 7.8 HIGH

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.

PackageEcosystemFixed in
bpftoolAmazon Linux6.1.106-116.188.amzn2023
kernelAmazon Linux6.1.106-116.188.amzn2023
linux_kernellinux6.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

CVSS 3.1
7.8
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
LinuxLinux3a17ca864baffc0c6f6e8aad525aa4365775a193, 4e19d6b65fb4fc42e352ce9883649e049da14743, 4e19d6b65fb4fc42e352ce9883649e049da14743
LinuxLinux5.3, 0, 4.19.320
amazon:2023bpftool0
amazon:2023kernel0
linuxlinux_kernel4.19.62, 5.3, 5.2.4
amazon:2023python3-perf0
amazon:2023kernel-tools-devel0
LinuxLinux5.2.4, 3f0307b0d2d8b333a6964fc4c820dc86896fd1cf, 514631c2225c1fd556c799cc1893fb27b0f48f00
amazon:2023kernel-libbpf-devel0
amazon:2023perf0
amazon:2023kernel-libbpf-static0
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystem0
amazon:2perf0
amazon:2023kernel-livepatch-6.1.106-116.1880
amazon:2kernel-livepatch-4.14.353-270.5690
amazon:2023kernel-tools0
amazon:2kernel-tools0
amazon:2kernel-tools-devel0
amazon:2023kernel-devel0
amazon:2023kernel-modules-extra0

…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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›