CVE-2026-89786: ext4: fix out-of-bounds read in ext4_read_inline_dir()

Published Sep 16, 2026
·
Updated

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

ext4: fix out-of-bounds read in ext4readinlinedir()

ext4readinlinedir() can read a dirent header past the end of its inline buffer, triggering a slab-out-of-bounds read during getdents64():

BUG: KASAN: slab-out-of-bounds in ext4checkdirentry Read of size 2 at addr ffff88800f3dd23c by task exploit/148 ... ext4checkdirentry ext4readinlinedir iteratedir

The dirent payload lives in a buffer of exactly inlinesize bytes:

dirbuf = kmalloc(inlinesize, GFPNOFS);

but iteration runs in a position space extraoffset bytes larger (extrasize = extraoffset + inlinesize) so the synthetic "." and ".." land at their block-dir offsets. A dirent is formed at "dirbuf + pos - extraoffset", yet the ext4checkdirentry() length argument uses the larger extrasize. A position whose dirent header would extend past extrasize is therefore accepted, and the rescan loop's reclen probe and ext4checkdirentry() dereference de->reclen before the entry is rejected.

Reject a position whose minimum-size dirent header would not fit within extrasize before forming de, in both the rescan and main loops, and pass inlinesize rather than extrasize to ext4checkdirentry() so the length check matches the physical buffer.

Affected Software

1 affected component
Linux Kernel

Event History

Sep 16, 2026
CVE Published
via MITRE·08:48 AM
Data Sourced
via MITRE·08:48 AM
Description

Frequently Asked Questions

1

When can the invalid read be triggered?

The read occurs while listing directory entries through getdents64(), in the ext4 inline-directory handling path.

2

What evidence may indicate that this issue has occurred?

With KASAN enabled, it can appear as a slab-out-of-bounds read in __ext4_check_dir_entry(), reached through ext4_read_inline_dir() and iterate_dir.

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