packet: Don't write vnet header beyond end of buffer
authorBenjamin Poirier <bpoirier@suse.com>
Mon, 28 Aug 2017 18:29:41 +0000 (14:29 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Aug 2017 22:09:13 +0000 (15:09 -0700)
commitedbd58be15a957f6a760c4a514cd475217eb97fd
tree70ee02965e5dc3fc5887ea1222d54988a8b27bf3
parentd55c60eba0ef44ec21831ce26db300763eafd865
packet: Don't write vnet header beyond end of buffer

... which may happen with certain values of tp_reserve and maclen.

Fixes: 58d19b19cd99 ("packet: vnet_hdr support for tpacket_rcv")
Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
Cc: Willem de Bruijn <willemb@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c