Re: [PATCH] ext4: validate p_idx bounds in ext4_ext_correct_indexes

From: Theodore Ts'o

Date: Fri Mar 27 2026 - 00:08:25 EST



On Wed, 04 Mar 2026 07:32:08 +0000, tejas bharambe wrote:
> ext4_ext_correct_indexes() walks up the extent tree correcting
> index entries when the first extent in a leaf is modified. Before
> accessing path[k].p_idx->ei_block, there is no validation that
> p_idx falls within the valid range of index entries for that
> level.
>
> If the on-disk extent header contains a corrupted or crafted
> eh_entries value, p_idx can point past the end of the allocated
> buffer, causing a slab-out-of-bounds read.
>
> [...]

Applied, thanks!

[1/1] ext4: validate p_idx bounds in ext4_ext_correct_indexes
commit: a32da9c8bcceb70a5ced2f74c7551d300c541455

Best regards,
--
Theodore Ts'o <tytso@xxxxxxx>