CVE-2024-42304

ext4: make sure the first directory block is not a hole

MEDIUM
5.5
CVSS Score
Published: August 17, 2024 at 09:09 AM UTC
Updated: October 15, 2026 at 01:18 AM UTC
2 products affected across 2 vendorsLinux KernelSIMATIC S7-1500 TM MFP

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

4.14.135 ≤ v < 4.154.19.62 ≤ v < 4.19.3204.9.187 ≤ v < 4.105.1.21 ≤ v < 5.25.11 ≤ v < 5.15.1655.16 ≤ v < 6.1.1035.2.4 ≤ v < 5.4.2825.5 ≤ v < 5.10.2246.2 ≤ v < 6.6.446.7 ≤ v < 6.10.33a17ca864baffc0c6f6e8aad525aa4365775a1933f0307b0d2d8b333a6964fc4c820dc86896fd1cf4.14.1354.19.624.9.1874e19d6b65fb4fc42e352ce9883649e049da147435.1.215.2.45.35021b7a5bdd6bb859eb648c3da71cdd6aae1d133514631c2225c1fd556c799cc1893fb27b0f48f007f1f86276515f6816a98f6ca3ef99c827d54642f
Vendor states this is fixed in 299bc6ffa57e04e74c6cce866d6c0741fb4897a1 (fixed)
Vendor states this is fixed in 9771e3d8365ae1dd5e8846a204cb9af14e3e656a (fixed)
Vendor states this is fixed in b609753cbbd38f8c0affd4956c0af178348523ac (fixed)
Vendor states this is fixed in c3893d9de8ee153baac56d127d844103488133b5 (fixed)
Vendor states this is fixed in d81d7e347d1f1f48a5634607d39eb90c161c8afe (fixed)
Vendor states this is fixed in de2a011a13a46468a6e8259db58b1b62071fe136 (fixed)
Vendor states this is fixed in e02f9941e8c011aa3eafa799def6a134ce06bcfa (fixed)
Vendor states this is fixed in f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6 (fixed)
Affected range stops below 4.10, so it looks safe — our inference, not a vendor statement
Affected range stops below 4.15, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 4.19.320 (unaffected)
Vendor states this is fixed in 5.10.224 (unaffected)
Vendor states this is fixed in 5.15.165 (unaffected)
Affected range stops below 5.2, so it looks safe — our inference, not a vendor statement
Vendor states this is fixed in 5.3 (unaffected)
Vendor states this is fixed in 5.4.282 (unaffected)
Vendor states this is fixed in 6.1.103 (unaffected)
Vendor states this is fixed in 6.10.3 (unaffected)
Vendor states this is fixed in 6.11 (unaffected)
Vendor states this is fixed in 6.6.44 (unaffected)

References (11)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/299bc6ffa57e04e74c6cce866d6c0741fb4897a1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9771e3d8365ae1dd5e8846a204cb9af14e3e656a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/b609753cbbd38f8c0affd4956c0af178348523ac
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/c3893d9de8ee153baac56d127d844103488133b5
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d81d7e347d1f1f48a5634607d39eb90c161c8afe
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/de2a011a13a46468a6e8259db58b1b62071fe136
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/e02f9941e8c011aa3eafa799def6a134ce06bcfa
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/f9ca51596bbfd0f9c386dd1c613c394c78d9e5e6

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
NVD-CWE-noinfo

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card