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.
Advisories
Source ID Title
Debian DLA Debian DLA DLA-3912-1 linux security update
Debian DLA Debian DLA DLA-4008-1 linux-6.1 security update
Ubuntu USN Ubuntu USN USN-7088-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7088-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7088-3 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7088-4 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7088-5 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7100-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7100-2 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7119-1 Linux kernel (IoT) vulnerabilities
Ubuntu USN Ubuntu USN USN-7123-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-7144-1 Linux kernel (Intel IoTG) vulnerabilities
Ubuntu USN Ubuntu USN USN-7154-1 Linux kernel vulnerabilities
Ubuntu USN Ubuntu USN USN-7155-1 Linux kernel (NVIDIA) vulnerabilities
Ubuntu USN Ubuntu USN USN-7156-1 Linux kernel (GKE) vulnerabilities
Ubuntu USN Ubuntu USN USN-7154-2 Linux kernel (HWE) vulnerabilities
Ubuntu USN Ubuntu USN USN-7194-1 Linux kernel (Azure) vulnerabilities
Ubuntu USN Ubuntu USN USN-7196-1 Linux kernel (Azure) vulnerabilities
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Tue, 07 Oct 2025 20:30:00 +0000

Type Values Removed Values Added
First Time appeared Linux
Linux linux Kernel
Weaknesses NVD-CWE-noinfo
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel

Wed, 16 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.00327}

epss

{'score': 0.00266}


Wed, 14 May 2025 02:30:00 +0000

Type Values Removed Values Added
First Time appeared Redhat
Redhat enterprise Linux
CPEs cpe:/a:redhat:enterprise_linux:9
cpe:/o:redhat:enterprise_linux:9
Vendors & Products Redhat
Redhat enterprise Linux

Wed, 11 Sep 2024 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 19 Aug 2024 19:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Mon, 19 Aug 2024 04:45:00 +0000


Sat, 17 Aug 2024 09:15:00 +0000

Type Values Removed Values Added
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.
Title ext4: make sure the first directory block is not a hole
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2025-05-04T12:58:00.209Z

Reserved: 2024-07-30T07:40:12.272Z

Link: CVE-2024-42304

cve-icon Vulnrichment

Updated: 2024-09-11T12:42:23.530Z

cve-icon NVD

Status : Analyzed

Published: 2024-08-17T09:15:10.617

Modified: 2025-10-07T20:26:46.130

Link: CVE-2024-42304

cve-icon Redhat

Severity : Moderate

Publid Date: 2024-08-17T00:00:00Z

Links: CVE-2024-42304 - Bugzilla

cve-icon OpenCVE Enrichment

No data.