diff options
author | Randy Dunlap <[email protected]> | 2022-05-12 20:38:37 -0700 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2022-05-12 20:38:37 -0700 |
commit | a3b774342fa752a5290c0de36375289dfcf4a260 (patch) | |
tree | f48108dace8ad58195207d2f8b5242127ce69657 /scripts/gdb/linux/tasks.py | |
parent | cd290a9839cee2f6641558877e707bd373c8f6f1 (diff) |
fs/ntfs3: validate BOOT sectors_per_clusters
When the NTFS BOOT sectors_per_clusters field is > 0x80, it represents a
shift value. Make sure that the shift value is not too large before using
it (NTFS max cluster size is 2MB). Return -EVINVAL if it too large.
This prevents negative shift values and shift values that are larger than
the field size.
Prevents this UBSAN error:
UBSAN: shift-out-of-bounds in ../fs/ntfs3/super.c:673:16
shift exponent -192 is negative
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Signed-off-by: Randy Dunlap <[email protected]>
Reported-by: [email protected]
Reviewed-by: Namjae Jeon <[email protected]>
Cc: Konstantin Komarov <[email protected]>
Cc: Alexander Viro <[email protected]>
Cc: Kari Argillander <[email protected]>
Cc: Namjae Jeon <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions