[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1490802668.24891.32.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Wed, 29 Mar 2017 08:51:08 -0700
From: Eric Dumazet <eric.dumazet@...il.com>
To: Andrey Konovalov <andreyknvl@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Willem de Bruijn <willemb@...gle.com>,
Craig Gallek <cgallek@...gle.com>, netdev@...r.kernel.org,
Dmitry Vyukov <dvyukov@...gle.com>,
Kostya Serebryany <kcc@...gle.com>
Subject: Re: [PATCH net v2 2/3] net/packet: fix overflow in check for
tp_frame_nr
On Wed, 2017-03-29 at 16:11 +0200, Andrey Konovalov wrote:
> When calculating rb->frames_per_block * req->tp_block_nr the result
> can overflow.
>
> Add a check that tp_block_size * tp_block_nr <= UINT_MAX.
>
> Since frames_per_block <= tp_block_size, the expression would
> never overflow.
>
> Signed-off-by: Andrey Konovalov <andreyknvl@...gle.com>
> ---
Acked-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists