Re: [PATCH] ext4: fix OOB memmove in ext4_xattr_set_entry

From: Theodore Ts'o

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



On Fri, 18 Sep 2026 18:12:49 +0800, Zhao Gongyi wrote:
> A corrupted filesystem can leave an inode marked as having inline data
> while the system.data xattr is missing. ext4_destroy_inline_data_nolock()
> then asks ext4_xattr_set_entry() to remove an entry even though
> ext4_xattr_ibody_find() left the search state at the insertion position.
>
> In the syzkaller reproducer, the old xattr value offset is smaller than
> min_offs. ext4_xattr_set_entry() then computes val - first_val for
> memmove(), the length wraps to a huge size_t, and memmove() can run out of
> the xattr buffer. This results in an out-of-bounds memmove and a kernel
> page fault.
>
> [...]

Applied, thanks!

[1/1] ext4: fix OOB memmove in ext4_xattr_set_entry
commit: 1608d1abdc62d09f9eae9df925d471598bdf6913

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