Skip to content

e2fsprogs: fix extended attribute iteration loop bounds checking

Eric Sandeen linux-ext4 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8e2fsck: fix in-inode extended attribute checkinge2fsck/pass1.c tests/f_inode_ea_collision/expect.1+13 -220 replies
2/8e2fsck: fix extended attribute block checkinge2fsck/pass1.c+14 -50 replies
3/8e2fsck: fix ea loop in inc_ea_inode_refse2fsck/pass1.c+9 -50 replies
4/8libext2fs: fix ea loop in ext2fs_ext_attr_block_rehashlib/ext2fs/ext_attr.c+8 -10 replies
5/8libext2fs: fix ea loop in read_xattrs_from_bufferlib/ext2fs/ext_attr.c+12 -260 replies
6/8tune2fs: fix ea loop in update_xattr_entry_hashesmisc/tune2fs.c+9 -30 replies
7/8resize2fs: fix ea loop in update_xattr_entry_hashesresize/resize2fs.c+16 -10 replies
8/8libext2fs: fix ea loop in ext2fs_xattr_inode_max_sizelib/ext2fs/ext_attr.c+14 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] e2fsprogs: fix extended attribute iteration loop bounds checking

This is also the result of some LLM scanning that Red Hat did.

The first patch in this series has the complete description of the issues being addressed; the others follow that same pattern.

In short, extended attribute parsing loops across e2fsprogs share a common set of bounds-checking bugs: they fail to reserve space for the mandatory end marker, don't verify a complete entry header or name record fits before accessing it, and miscalculate remaining free space by ignoring 4-byte value alignment. </ai summary>

I'm sending these on behalf of Andreas because a few of us collaborated on a big pile of reports and the original plan was to batch them all up and send together regardless of authorship, but the list got a bit too long for that. I still volunteered to handle the series-sending.

Also, the AISLE attribution lines on these are what was requested. If that's at all bothersome or unwanted, no problem sending without that, or removal on merge.

Thanks,
-Eric