[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <722331f3-55f8-868f-0f52-60e17e28e862@gmail.com>
Date: Mon, 23 Sep 2019 08:52:58 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jakub Kicinski <jakub.kicinski@...ronome.com>,
Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] sch_netem: fix a divide by zero in tabledist()
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 <edumazet@...gle.com>
>> Reported-by: syzbot <syzkaller@...glegroups.com>
>
> Applied, queued, thank you!
>
Note that another divide by zero seems possible in the same function,
if sigma = 0x8000000
2*sigma becomes zero, and we have yet another issue in :
if (dist == NULL)
return ((rnd % (2 * sigma)) + mu) - sigma;
Powered by blists - more mailing lists