Commit 720a66fd authored by Deepanshu Kartikey's avatar Deepanshu Kartikey Committed by Greg Kroah-Hartman
Browse files

ext4: validate ea_ino and size in check_xattrs



commit 44d2a72f upstream.

During xattr block validation, check_xattrs() processes xattr entries
without validating that entries claiming to use EA inodes have non-zero
sizes. Corrupted filesystems may contain xattr entries where e_value_size
is zero but e_value_inum is non-zero, indicating invalid xattr data.

Add validation in check_xattrs() to detect this corruption pattern early
and return -EFSCORRUPTED, preventing invalid xattr entries from causing
issues throughout the ext4 codebase.

Cc: stable@kernel.org
Suggested-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reported-by: default avatar <syzbot+4c9d23743a2409b80293@syzkaller.appspotmail.com>
Link: https://syzkaller.appspot.com/bug?extid=4c9d23743a2409b80293


Signed-off-by: default avatarDeepanshu Kartikey <kartikey406@gmail.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Message-ID: <20250923133245.1091761-1-kartikey406@gmail.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 79ea7f3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment