NVD Vulnerability Detail
Search Exploit, PoC
CVE-2024-42305
Summary

In the Linux kernel, the following vulnerability has been resolved:

ext4: check dot and dotdot of dx_root before making dir indexed

Syzbot reports a issue as follows:
============================================
BUG: unable to handle page fault for address: ffffed11022e24fe
PGD 23ffee067 P4D 23ffee067 PUD 0
Oops: Oops: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 0 PID: 5079 Comm: syz-executor306 Not tainted 6.10.0-rc5-g55027e689933 #0
Call Trace:
<TASK>
make_indexed_dir+0xdaf/0x13c0 fs/ext4/namei.c:2341
ext4_add_entry+0x222a/0x25d0 fs/ext4/namei.c:2451
ext4_rename fs/ext4/namei.c:3936 [inline]
ext4_rename2+0x26e5/0x4370 fs/ext4/namei.c:4214
[...]
============================================

The immediate cause of this problem is that there is only one valid dentry
for the block to be split during do_split, so split==0 results in out of
bounds accesses to the map triggering the issue.

do_split
unsigned split
dx_make_map
count = 1
split = count/2 = 0;
continued = hash2 == map[split - 1].hash;
---> map[4294967295]

The maximum length of a filename is 255 and the minimum block size is 1024,
so it is always guaranteed that the number of entries is greater than or
equal to 2 when do_split() is called.

But syzbot's crafted image has no dot and dotdot in dir, and the dentry
distribution in dirblock is as follows:

bus dentry1 hole dentry2 free
|xx--|xx-------------|...............|xx-------------|...............|
0 12 (8+248)=256 268 256 524 (8+256)=264 788 236 1024

So when renaming dentry1 increases its name_len length by 1, neither hole
nor free is sufficient to hold the new dentry, and make_indexed_dir() is
called.

In make_indexed_dir() it is assumed that the first two entries of the
dirblock must be dot and dotdot, so bus and dentry1 are left in dx_root
because they are treated as dot and dotdot, and only dentry2 is moved
to the new leaf block. That's why count is equal to 1.

Therefore add the ext4_check_dx_root() helper function to add more sanity
checks to dot and dotdot before starting the conversion to avoid the above
issue.

Publication Date Aug. 17, 2024, 6:15 p.m.
Registration Date Aug. 26, 2024, 5:01 p.m.
Last Update Aug. 19, 2024, 9:59 p.m.
Related information, measures and tools
Common Vulnerabilities List

JVN Vulnerability Information
Linux の Linux Kernel における境界外読み取りに関する脆弱性
Title Linux の Linux Kernel における境界外読み取りに関する脆弱性
Summary

Linux の Linux Kernel には、境界外読み取りに関する脆弱性が存在します。

Possible impacts サービス運用妨害 (DoS) 状態にされる可能性があります。 
Solution

ベンダより正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

Publication Date July 10, 2024, midnight
Registration Date Oct. 7, 2025, 5:58 p.m.
Last Update Oct. 7, 2025, 5:58 p.m.
Affected System
Linux
Linux Kernel 2.6.19
Linux Kernel 2.6.20 以上 4.19.320 未満
Linux Kernel 4.20 以上 5.4.282 未満
Linux Kernel 5.11 以上 5.15.165 未満
Linux Kernel 5.16 以上 6.1.103 未満
Linux Kernel 5.5 以上 5.10.224 未満
Linux Kernel 6.2 以上 6.6.44 未満
Linux Kernel 6.7 以上 6.10.3 未満
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
Change Log
No Changed Details Date of change
1 [2025年10月07日]
  掲載
Oct. 7, 2025, 5:58 p.m.