android_kernel_motorola_sm6375/fs/ocfs2
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Edward Adam Davis 95fbed8ae8 ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow
[ Upstream commit bc0a2f3a73fcdac651fca64df39306d1e5ebe3b0 ]

Syzbot reported a kernel BUG in ocfs2_truncate_inline.  There are two
reasons for this: first, the parameter value passed is greater than
ocfs2_max_inline_data_with_xattr, second, the start and end parameters of
ocfs2_truncate_inline are "unsigned int".

So, we need to add a sanity check for byte_start and byte_len right before
ocfs2_truncate_inline() in ocfs2_remove_inode_range(), if they are greater
than ocfs2_max_inline_data_with_xattr return -EINVAL.

Link: https://lkml.kernel.org/r/[email protected]
Fixes: 1afc32b952 ("ocfs2: Write support for inline data")
Signed-off-by: Edward Adam Davis <[email protected]>
Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=81092778aac03460d6b7
Reviewed-by: Joseph Qi <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
2024-11-08 16:20:54 +01:00
..
cluster
dlm ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use 2023-06-09 10:28:54 +02:00
dlmfs ocfs2: dlmfs: fix error handling of user_dlm_destroy_lock 2022-06-14 18:11:46 +02:00
acl.c
acl.h
alloc.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
alloc.h
aops.c ocfs2: fix uninit-value in ocfs2_get_block() 2024-11-08 16:20:41 +01:00
aops.h
blockcheck.c
blockcheck.h
buffer_head_io.c ocfs2: fix possible null-ptr-deref in ocfs2_set_buffer_uptodate 2024-11-08 16:20:41 +01:00
buffer_head_io.h
dcache.c
dcache.h
dir.c ocfs2: add bounds checking to ocfs2_check_dir_entry() 2024-07-27 10:38:33 +02:00
dir.h
dlmglue.c ocfs2: fix freeing uninitialized resource on ocfs2_dlm_shutdown 2023-01-18 11:42:06 +01:00
dlmglue.h
export.c
export.h
extent_map.c treewide: Remove uninitialized_var() usage 2023-06-09 10:29:01 +02:00
extent_map.h
file.c ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow 2024-11-08 16:20:54 +01:00
file.h
filecheck.c ocfs2: fix snprintf() checking 2021-07-14 16:53:25 +02:00
filecheck.h
heartbeat.c
heartbeat.h
inode.c
inode.h
ioctl.c
ioctl.h
journal.c ocfs2: fix null-ptr-deref when journal load failed. 2024-11-08 16:20:41 +01:00
journal.h ocfs2: fix memory leak in ocfs2_mount_volume() 2023-01-18 11:40:56 +01:00
Kconfig
localalloc.c ocfs2: fix the la space leak when unmounting an ocfs2 volume 2024-11-08 16:20:41 +01:00
localalloc.h
locks.c
locks.h
Makefile
mmap.c
mmap.h
move_extents.c ocfs2: fix non-auto defrag path not working issue 2023-03-11 16:44:00 +01:00
move_extents.h
namei.c ocfs2: use coarse time for new created files 2024-07-05 09:08:18 +02:00
namei.h
ocfs1_fs_compat.h
ocfs2.h
ocfs2_fs.h
ocfs2_ioctl.h
ocfs2_lockid.h
ocfs2_lockingver.h
ocfs2_trace.h
quota.h
quota_global.c
quota_local.c ocfs2: cancel dqi_sync_work before freeing oinfo 2024-11-08 16:20:41 +01:00
refcounttree.c ocfs2: reserve space for inline xattr before attaching reflink tree 2024-11-08 16:20:41 +01:00
refcounttree.h
reservations.c
reservations.h
resize.c
resize.h
slot_map.c
slot_map.h
stack_o2cb.c
stack_user.c
stackglue.c ocfs2: fix memory leak in ocfs2_stack_glue_init() 2023-01-18 11:40:54 +01:00
stackglue.h
suballoc.c
suballoc.h
super.c ocfs2: fix use-after-free when unmounting read-only filesystem 2023-06-21 15:44:09 +02:00
super.h
symlink.c
symlink.h
sysfile.c
sysfile.h
uptodate.c
uptodate.h
xattr.c ocfs2: reserve space for inline xattr before attaching reflink tree 2024-11-08 16:20:41 +01:00
xattr.h