On Mon, Sep 23, 2019 at 8:53 AM Eric Dumazet <eric.duma...@gmail.com> wrote: > > > > On 9/20/19 7:15 PM, Jakub Kicinski wrote: > > On Wed, 18 Sep 2019 08:05:39 -0700, Eric Dumazet wrote: > >> syzbot managed to crash the kernel in tabledist() loading > >> an empty distribution table. > >> > >> t = dist->table[rnd % dist->size]; > >> > >> Simply return an error when such load is attempted. > >> > >> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") > >> Signed-off-by: Eric Dumazet <eduma...@google.com> > >> Reported-by: syzbot <syzkal...@googlegroups.com> > > > > Applied, queued, thank you! > > > > Note that another divide by zero seems possible in the same function, > if sigma = 0x8000000
I meant 0x80000000 here (aka 2^31 ) > > > 2*sigma becomes zero, and we have yet another issue in : > > if (dist == NULL) > return ((rnd % (2 * sigma)) + mu) - sigma; > >