Re: [PATCH] ext4: add bounds check for e_value_offs in ext4_read_inline_data

From: Theodore Ts'o

Date: Thu Nov 19 2026 - 09:53:14 EST



On Fri, 18 Sep 2026 06:35:58 +0530, Deepanshu Kartikey wrote:
> ext4_read_inline_data() reads the location of an inline data xattr
> value directly from entry->e_value_offs without validating it against
> the actual bounds of the inode's xattr area. A corrupted filesystem
> image can set e_value_offs to an out-of-range value, causing the
> subsequent memcpy() to read from an address far outside the inode
> buffer, including memory that has already been freed and reused for
> something else. This mirrors the check already performed in
> ext4_xattr_ibody_get(), which is missing here.
>
> [...]

Applied, thanks!

[1/1] ext4: add bounds check for e_value_offs in ext4_read_inline_data
commit: 17c7e8552739e8bdd5345fd69a0d92e47f33eb9b

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