]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
packet: validate variable length ll headers
authorWillem de Bruijn <willemb@google.com>
Thu, 10 Mar 2016 02:58:34 +0000 (21:58 -0500)
committerTim Gardner <tim.gardner@canonical.com>
Thu, 21 Apr 2016 13:20:26 +0000 (07:20 -0600)
commitd7e785c4e570d083790327ddf0ad61a45cfb9961
tree71c9074d006b2c58d395f9f5d7d36464b1628db6
parente982f8d9189dfc6e1f02970742b99d88e25ec68e
packet: validate variable length ll headers

BugLink: http://bugs.launchpad.net/bugs/1573034
[ Upstream commit 9ed988cd591500c040b2a6257bc68543e08ceeef ]

Replace link layer header validation check ll_header_truncate with
more generic dev_validate_header.

Validation based on hard_header_len incorrectly drops valid packets
in variable length protocols, such as AX25. dev_validate_header
calls header_ops.validate for such protocols to ensure correctness
below hard_header_len.

See also http://comments.gmane.org/gmane.linux.network/401064

Fixes 9c7077622dd9 ("packet: make packet_snd fail on len smaller than l2 header")
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
net/packet/af_packet.c