ext4: disallow ea_inodes with extended attributes
authorTheodore Ts'o <tytso@mit.edu>
Wed, 24 May 2023 03:49:50 +0000 (23:49 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2023 08:34:26 +0000 (10:34 +0200)
commit140aa33f96d6df51e1c8d161fcc603617a1fd0de
tree8fe3d0d72af723706b0cd3a8bf8246687ade0e53
parent277cea6f7786eda99b6b8eb9cc08f2f5a9c8de03
ext4: disallow ea_inodes with extended attributes

commit 2bc7e7c1a3bc9bd0cbf0f71006f6fe7ef24a00c2 upstream.

An ea_inode stores the value of an extended attribute; it can not have
extended attributes itself, or this will cause recursive nightmares.
Add a check in ext4_iget() to make sure this is the case.

Cc: stable@kernel.org
Reported-by: syzbot+e44749b6ba4d0434cd47@syzkaller.appspotmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20230524034951.779531-4-tytso@mit.edu
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/inode.c