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.
Metrics
Affected Vendors & Products
Source | ID | Title |
---|---|---|
![]() |
DLA-3912-1 | linux security update |
![]() |
DLA-4008-1 | linux-6.1 security update |
![]() |
USN-7088-1 | Linux kernel vulnerabilities |
![]() |
USN-7088-2 | Linux kernel vulnerabilities |
![]() |
USN-7088-3 | Linux kernel vulnerabilities |
![]() |
USN-7088-4 | Linux kernel vulnerabilities |
![]() |
USN-7088-5 | Linux kernel vulnerabilities |
![]() |
USN-7100-1 | Linux kernel vulnerabilities |
![]() |
USN-7100-2 | Linux kernel vulnerabilities |
![]() |
USN-7119-1 | Linux kernel (IoT) vulnerabilities |
![]() |
USN-7123-1 | Linux kernel (Azure) vulnerabilities |
![]() |
USN-7144-1 | Linux kernel (Intel IoTG) vulnerabilities |
![]() |
USN-7154-1 | Linux kernel vulnerabilities |
![]() |
USN-7155-1 | Linux kernel (NVIDIA) vulnerabilities |
![]() |
USN-7156-1 | Linux kernel (GKE) vulnerabilities |
![]() |
USN-7154-2 | Linux kernel (HWE) vulnerabilities |
![]() |
USN-7194-1 | Linux kernel (Azure) vulnerabilities |
![]() |
USN-7196-1 | Linux kernel (Azure) vulnerabilities |
Solution
No solution given by the vendor.
Workaround
No workaround given by the vendor.
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
|
epss
|
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
|
Mon, 19 Aug 2024 19:15:00 +0000
Type | Values Removed | Values Added |
---|---|---|
References |
| |
Metrics |
threat_severity
|
cvssV3_1
|
Mon, 19 Aug 2024 04:45:00 +0000
Type | Values Removed | Values Added |
---|---|---|
References |
|
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 |
|

Status: PUBLISHED
Assigner: Linux
Published:
Updated: 2025-05-04T12:58:00.209Z
Reserved: 2024-07-30T07:40:12.272Z
Link: CVE-2024-42304

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

Status : Analyzed
Published: 2024-08-17T09:15:10.617
Modified: 2025-10-07T20:26:46.130
Link: CVE-2024-42304


No data.