From: Andrey Konovalov Date: Wed, 29 Mar 2017 14:11:21 +0000 (+0200) Subject: net/packet: fix overflow in check for tp_frame_nr X-Git-Tag: v3.2.89~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1634172286550a62d8a0a98cf8bec5cd975fa09c;p=pandora-kernel.git net/packet: fix overflow in check for tp_frame_nr commit 8f8d28e4d6d815a391285e121c3a53a0b6cb9e7b upstream. 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 Acked-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- Reading git-diff-tree failed