linux-stable/fs/ntfs3
Shigeru Yoshida caad9dd879
fs/ntfs3: Avoid UBSAN error on true_sectors_per_clst()
syzbot reported UBSAN error as below:

[   76.901829][ T6677] ================================================================================
[   76.903908][ T6677] UBSAN: shift-out-of-bounds in fs/ntfs3/super.c:675:13
[   76.905363][ T6677] shift exponent -247 is negative

This patch avoid this error.

Link: https://syzkaller.appspot.com/bug?id=b0299c09a14aababf0f1c862dd4ebc8ab9eb0179
Fixes: a3b774342f (fs/ntfs3: validate BOOT sectors_per_clusters)
Cc: Author: Randy Dunlap <rdunlap@infradead.org>
Reported-by: syzbot+35b87c668935bb55e666@syzkaller.appspotmail.com
Signed-off-by: Shigeru Yoshida <syoshida@redhat.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2022-09-30 17:39:52 +03:00
..
lib fs/ntfs3: Add missing header and guards to lib/ headers 2021-09-13 19:41:44 +03:00
attrib.c fs/ntfs3: Fix attr_punch_hole() null pointer derenference 2022-09-30 17:39:50 +03:00
attrlist.c fs/ntfs3: Validate data run offset 2022-09-30 17:39:49 +03:00
bitfunc.c fs/ntfs3: Remove a useless shadowing variable 2021-09-23 19:05:46 +03:00
bitmap.c fs/ntfs3: Use kmalloc_array for allocating multiple elements 2022-09-30 17:39:51 +03:00
debug.h fs/ntfs3. Add forward declarations for structs to debug.h 2021-09-13 19:41:43 +03:00
dir.c fs/ntfs3: Rework ntfs_utf16_to_nls 2021-10-11 19:28:04 +03:00
file.c ntfs3 for 6.0 2022-08-17 14:51:22 -07:00
frecord.c fs/ntfs3: Validate data run offset 2022-09-30 17:39:49 +03:00
fslog.c fs/ntfs3: Validate data run offset 2022-09-30 17:39:49 +03:00
fsntfs.c ntfs3 for 6.0 2022-08-17 14:51:22 -07:00
index.c fs/ntfs3: Add option "nocase" 2022-09-30 17:39:47 +03:00
inode.c fs/ntfs3: Validate data run offset 2022-09-30 17:39:49 +03:00
Kconfig
lznt.c fs/ntfs3: Remove tabs before spaces from comment 2021-09-16 17:01:36 +03:00
Makefile
namei.c fs/ntfs3: Add option "nocase" 2022-09-30 17:39:47 +03:00
ntfs.h fs/ntfs3: Change max hardlinks limit to 4000 2021-09-21 18:37:01 +03:00
ntfs_fs.h fs/ntfs3: Add option "nocase" 2022-09-30 17:39:47 +03:00
record.c fs/ntfs3: Add overflow check for attribute size 2022-09-30 17:39:49 +03:00
run.c fs/ntfs3: Refactoring attr_punch_hole to restore after errors 2022-08-03 18:25:09 +03:00
super.c fs/ntfs3: Avoid UBSAN error on true_sectors_per_clst() 2022-09-30 17:39:52 +03:00
upcase.c fs/ntfs3: Add option "nocase" 2022-09-30 17:39:47 +03:00
xattr.c fs.idmapped.fixes.v6.0-rc3 2022-08-22 11:33:02 -07:00