From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jakub Kicinski <jakub.kicinski@netronome.com>,
Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
netdev <netdev@vger.kernel.org>,
Eric Dumazet <eric.dumazet@gmail.com>,
syzbot <syzkaller@googlegroups.com>
Subject: Re: [PATCH net] sch_netem: fix a divide by zero in tabledist()
Date: Mon, 23 Sep 2019 08:52:58 -0700 [thread overview]
Message-ID: <722331f3-55f8-868f-0f52-60e17e28e862@gmail.com> (raw)
In-Reply-To: <20190920191516.073d88b6@cakuba.netronome.com>
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@google.com>
>> Reported-by: syzbot <syzkaller@googlegroups.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;
next prev parent reply other threads:[~2019-09-23 15:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-18 15:05 [PATCH net] sch_netem: fix a divide by zero in tabledist() Eric Dumazet
2019-09-21 2:15 ` Jakub Kicinski
2019-09-23 15:52 ` Eric Dumazet [this message]
2019-09-23 15:54 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=722331f3-55f8-868f-0f52-60e17e28e862@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jakub.kicinski@netronome.com \
--cc=netdev@vger.kernel.org \
--cc=syzkaller@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox