OSDN Git Service

packet: validate address length if non-zero
authorWillem de Bruijn <willemb@google.com>
Sat, 22 Dec 2018 21:53:45 +0000 (16:53 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Jan 2019 09:05:28 +0000 (10:05 +0100)
commit33a083483c24fddc2ece3c2d322a6fc39ae9f8b6
tree15a8b391a2b93869968e1ae9422658c2cd6e73b2
parent5b4dc608f82a7f2504619b3889334e0b621d84b5
packet: validate address length if non-zero

[ Upstream commit 6b8d95f1795c42161dc0984b6863e95d6acf24ed ]

Validate packet socket address length if a length is given. Zero
length is equivalent to not setting an address.

Fixes: 99137b7888f4 ("packet: validate address length")
Reported-by: Ido Schimmel <idosch@idosch.org>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/packet/af_packet.c