lkml.org 
[lkml]   [2021]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: UBSAN: shift-out-of-bounds in exfat_fill_super
Date
> > On Mon, Jan 25, 2021 at 09:33:14AM -0800, syzbot wrote:
> > > UBSAN: shift-out-of-bounds in fs/exfat/super.c:471:28 shift exponent
> > > 4294967294 is too large for 32-bit type 'int'
> >
> > This is an integer underflow:
> >
> > sbi->dentries_per_clu = 1 <<
> > (sbi->cluster_size_bits - DENTRY_SIZE_BITS);
> >
> > I think the problem is that there is no validation of sect_per_clus_bits.
> > We should check it is at least DENTRY_SIZE_BITS and probably that it's
> > less than ... 16? 64? I don't know what legitimate values are in this field, but I would imagine
> that 255 is completely unacceptable.
> exfat specification describe sect_per_clus_bits field of boot sector could be at most 32 and at least
typo ^^16
> 0. And sect_size_bits can also affect this calculation, It also needs validation.
> I will fix it.
> Thanks!

\
 
 \ /
  Last update: 2021-01-27 02:11    [W:0.133 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site