android_kernel_motorola_sm6375/fs/ext4
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Theodore Ts'o ba04d6af5a ext4: fix invalid free tracking in ext4_xattr_move_to_block()
commit b87c7cdf2bed4928b899e1ce91ef0d147017ba45 upstream.

In ext4_xattr_move_to_block(), the value of the extended attribute
which we need to move to an external block may be allocated by
kvmalloc() if the value is stored in an external inode.  So at the end
of the function the code tried to check if this was the case by
testing entry->e_value_inum.

However, at this point, the pointer to the xattr entry is no longer
valid, because it was removed from the original location where it had
been stored.  So we could end up calling kvfree() on a pointer which
was not allocated by kvmalloc(); or we could also potentially leak
memory by not freeing the buffer when it should be freed.  Fix this by
storing whether it should be freed in a separate variable.

Cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]
Link: https://syzkaller.appspot.com/bug?id=5c2aee8256e30b55ccf57312c16d88417adbd5e1
Link: https://syzkaller.appspot.com/bug?id=41a6b5d4917c0412eb3b3c3c604965bed7d7420b
Reported-by: [email protected]
Reported-by: [email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-05-17 11:36:03 +02:00
..
acl.c
acl.h
balloc.c ext4: fix WARNING in mb_find_extent 2023-05-17 11:36:02 +02:00
bitmap.c
block_validity.c
dir.c ext4: fix potential infinite loop in ext4_dx_readdir() 2021-10-06 15:42:37 +02:00
ext4.h ext4: add EXT4_IGET_BAD flag to prevent unexpected bad inode 2023-01-18 11:41:51 +01:00
ext4_extents.h
ext4_jbd2.c
ext4_jbd2.h
extents.c ext4: fix use-after-free read in ext4_find_extent for bigalloc + inline 2023-05-17 11:35:53 +02:00
extents_status.c ext4: fix data races when using cached status extents 2023-05-17 11:36:03 +02:00
extents_status.h
file.c ext4: avoid crash when inline data creation follows DIO write 2022-10-26 13:22:18 +02:00
fsmap.c ext4: fix another off-by-one fsmap error on 1k block filesystems 2023-03-17 08:32:48 +01:00
fsmap.h
fsync.c
hash.c
ialloc.c ext4: make directory inode spreading reflect flexbg size 2022-09-28 11:04:11 +02:00
indirect.c ext4: fix error code return to user-space in ext4_get_branch() 2023-01-18 11:41:52 +01:00
inline.c ext4: bail out of ext4_xattr_ibody_get() fails for any reason 2023-05-17 11:36:03 +02:00
inode.c ext4: fix kernel BUG in 'ext4_write_inline_data_end()' 2023-04-05 11:16:46 +02:00
ioctl.c ext4: zero i_disksize when initializing the bootloader inode 2023-03-17 08:32:48 +01:00
Kconfig
Makefile
mballoc.c ext4: remove a BUG_ON in ext4_mb_release_group_pa() 2023-05-17 11:36:03 +02:00
mballoc.h
migrate.c ext4: fix warning in 'ext4_da_release_space' 2022-11-10 17:57:56 +01:00
mmp.c
move_extent.c
namei.c ext4: fix possible double unlock when moving a directory 2023-03-22 13:28:08 +01:00
page-io.c ext4: fix cgroup writeback accounting with fs-layer encryption 2023-03-22 13:28:03 +01:00
readpage.c
resize.c ext4: fix corruption when online resizing a 1K bigalloc fs 2023-01-18 11:41:51 +01:00
super.c ext4: improve error recovery code paths in __ext4_remount() 2023-05-17 11:36:03 +02:00
symlink.c ext4: report correct st_size for encrypted symlinks 2021-09-12 08:56:38 +02:00
sysfs.c ext4: Fix function prototype mismatch for ext4_feat_ktype 2023-02-25 11:53:27 +01:00
truncate.h
verity.c fs: ext4: initialize fsdata in pagecache_write() 2023-01-18 11:41:55 +01:00
xattr.c ext4: fix invalid free tracking in ext4_xattr_move_to_block() 2023-05-17 11:36:03 +02:00
xattr.h ext4: remove duplicate definition of ext4_xattr_ibody_inline_set() 2023-04-26 11:24:05 +02:00
xattr_security.c
xattr_trusted.c
xattr_user.c