diff options
| author | Edward Adam Davis <[email protected]> | 2024-10-16 11:43:47 +0000 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2024-10-29 04:40:40 +0000 |
| commit | bc0a2f3a73fcdac651fca64df39306d1e5ebe3b0 (patch) | |
| tree | 7224b9b304a2329cd1c3adf8b08aadbdd632d093 /drivers/acpi/cppc_acpi.c | |
| parent | mm: shmem: fix data-race in shmem_getattr() (diff) | |
| download | kernel-bc0a2f3a73fcdac651fca64df39306d1e5ebe3b0.tar.gz kernel-bc0a2f3a73fcdac651fca64df39306d1e5ebe3b0.zip | |
ocfs2: pass u64 to ocfs2_truncate_inline maybe overflow
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: 1afc32b95233 ("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]>
Diffstat (limited to 'drivers/acpi/cppc_acpi.c')
0 files changed, 0 insertions, 0 deletions
