CVE-2024-42304: ext4: make sure the first directory block is not a hole

Published Aug 17, 2024
·
Updated

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.

ext4mknod ... ext4addentry // Read block 0 ext4readdirblock(dir, block, DIRENT) bh = ext4bread(NULL, inode, block, 0) if (!bh && (type == INDEX || type == DIRENTHTREE)) // 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 makeindexeddir()) to crash.

Therefore when ext4readdirblock() 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 Software

12 affected componentsFixes available
debian/linux<=5.10.223-1
5.10.234-16.1.129-16.1.135-16.12.25-16.12.27-1
debian/linux-6.1
6.1.129-1~deb11u1
Linux Linux kernel>=4.9.187<4.10
Linux Linux kernel>=4.14.135<4.15
Linux Linux kernel>=4.19.62<4.19.320
Linux Linux kernel>=5.1.21<5.2
Linux Linux kernel>=5.2.4<5.4.282
Linux Linux kernel>=5.5<5.10.224
Linux Linux kernel>=5.11<5.15.165
Linux Linux kernel>=5.16<6.1.103
Linux Linux kernel>=6.2<6.6.44
Linux Linux kernel>=6.7<6.10.3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  2. Upgrade

    Upgrade debian/linux-6.1 to a version that resolves this vulnerability.

    Fixed in 6.1.129-1~deb11u1

Event History

Aug 17, 2024
CVE Published
via MITRE·09:09 AM
Data Sourced
via MITRE·09:09 AM
DescriptionSeverity
Data Sourced
via NVD·09:15 AM
Description
Data Sourced
via NVD·09:15 AM
RemedySeverityAffected Software
Apr 27, 2025
Data Sourced
via Ubuntu·12:33 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-42304?

CVE-2024-42304 is rated as a moderate severity vulnerability affecting the ext4 filesystem in the Linux kernel.

2

How do I fix CVE-2024-42304?

To fix CVE-2024-42304, update your Linux kernel to version 5.10.226-1, 6.1.123-1, 6.1.119-1, 6.12.10-1, or 6.12.11-1, or apply the recommended patches.

3

What versions of Linux are affected by CVE-2024-42304?

CVE-2024-42304 affects Linux kernel versions up to and including 5.10.223-1 and specific versions of 6.1.

4

Is CVE-2024-42304 publicly known?

Yes, CVE-2024-42304 is a publicly disclosed vulnerability that has been documented in security advisories.

5

What is the impact of CVE-2024-42304 on Linux systems?

The impact of CVE-2024-42304 could potentially lead to data integrity issues if exploited, as it involves an improper handling of directory blocks.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203