diff options
author | Willem de Bruijn <willemb@google.com> | 2017-02-07 15:57:21 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-18 16:39:27 +0100 |
commit | 9117c897c9aa213fa0f682720f88a259b7ce7af9 (patch) | |
tree | 9290e6cfa5abb70914ad9ea7307f0dc5dab76210 /net/compat.c | |
parent | 58691e5b4f277cf1876dc95654a794b093f88a0f (diff) |
packet: round up linear to header len
[ Upstream commit 57031eb794906eea4e1c7b31dc1e2429c0af0c66 ]
Link layer protocols may unconditionally pull headers, as Ethernet
does in eth_type_trans. Ensure that the entire link layer header
always lies in the skb linear segment. tpacket_snd has such a check.
Extend this to packet_snd.
Variable length link layer headers complicate the computation
somewhat. Here skb->len may be smaller than dev->hard_header_len.
Round up the linear length to be at least as long as the smallest of
the two.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/compat.c')
0 files changed, 0 insertions, 0 deletions