On Fri, Apr 29, 2022 at 01:01:00PM -0700, Randy Dunlap wrote: > 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 (> 31) before using it. Return 0xffffffff if it is. > > 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 > > Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") > Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> > Reported-by: syzbot+1631f09646bc214d2e76@xxxxxxxxxxxxxxxxxxxxxxxxx Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>