summaryrefslogtreecommitdiff
path: root/include/asm-arm/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorTejas Bharambe <tejas.bharambe@outlook.com>2026-03-03 23:14:34 -0800
committerTheodore Ts'o <tytso@mit.edu>2026-03-27 23:33:46 -0400
commit2acb5c12ebd860f30e4faf67e6cc8c44ddfe5fe8 (patch)
tree28e15cdc68b982d6b6423b5f66ddab4a18da8310 /include/asm-arm/git@git.tavy.me:linux.git
parent73bf12adbea10b13647864cd1c62410d19e21086 (diff)
ext4: validate p_idx bounds in ext4_ext_correct_indexes
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. Fix this by validating path[k].p_idx against EXT_LAST_INDEX() at both access sites: before the while loop and inside it. Return -EFSCORRUPTED if the index pointer is out of range, consistent with how other bounds violations are handled in the ext4 extent tree code. Reported-by: syzbot+04c4e65cab786a2e5b7e@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=04c4e65cab786a2e5b7e Signed-off-by: Tejas Bharambe <tejas.bharambe@outlook.com> Link: https://patch.msgid.link/JH0PR06MB66326016F9B6AD24097D232B897CA@JH0PR06MB6632.apcprd06.prod.outlook.com Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.org
Diffstat (limited to 'include/asm-arm/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions