WSL2-Linux-Kernel/fs/ext4
Jan Kara c3e33c899d ext4: avoid writing unitialized memory to disk in EA inodes
[ Upstream commit 65121eff3e4c8c90f8126debf3c369228691c591 ]

If the extended attribute size is not a multiple of block size, the last
block in the EA inode will have uninitialized tail which will get
written to disk. We will never expose the data to userspace but still
this is not a good practice so just zero out the tail of the block as it
isn't going to cause a noticeable performance overhead.

Fixes: e50e5129f3 ("ext4: xattr-in-inode support")
Reported-by: syzbot+9c1fe13fcb51574b249b@syzkaller.appspotmail.com
Reported-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20240613150234.25176-1-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:45:03 +02:00
..
.kunitconfig
Kconfig
Makefile
acl.c
acl.h ext4: apply umask if ACL support is disabled 2023-11-28 16:56:35 +00:00
balloc.c ext4: add correct group descriptors and reserved GDT blocks to system zone 2023-09-19 12:23:01 +02:00
bitmap.c
block_validity.c ext4: add correct group descriptors and reserved GDT blocks to system zone 2023-09-19 12:23:01 +02:00
dir.c
ext4.h ext4: change s_last_trim_minblks type to unsigned long 2023-10-06 13:18:01 +02:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
extents.c ext4: correct the hole length returned by ext4_map_blocks() 2024-03-01 13:21:46 +01:00
extents_status.c ext4: fix infinite loop when replaying fast_commit 2024-08-19 05:45:02 +02:00
extents_status.h
fast_commit.c ext4: don't track ranges in fast_commit if inode has inlined data 2024-08-19 05:45:03 +02:00
fast_commit.h
file.c
fsmap.c
fsmap.h
fsync.c
hash.c
ialloc.c
indirect.c
inline.c
inode-test.c
inode.c
ioctl.c
mballoc.c ext4: fix potential unnitialized variable 2024-06-16 13:39:32 +02:00
mballoc.h ext4: set type of ac_groups_linear_remaining to __u32 to avoid overflow 2024-06-16 13:40:00 +02:00
migrate.c
mmp.c
move_extent.c ext4: fix double-free of blocks due to wrong extents moved_len 2024-02-23 08:55:06 +01:00
namei.c ext4: return early for non-eligible fast_commit track events 2024-08-19 05:45:03 +02:00
orphan.c
page-io.c
readpage.c
resize.c ext4: fix corruption during on-line resize 2024-04-10 16:18:40 +02:00
super.c ext4: forbid commit inconsistent quota data when errors=remount-ro 2024-04-13 13:01:45 +02:00
symlink.c
sysfs.c
truncate.h
verity.c
xattr.c ext4: avoid writing unitialized memory to disk in EA inodes 2024-08-19 05:45:03 +02:00
xattr.h
xattr_hurd.c
xattr_security.c
xattr_trusted.c
xattr_user.c