]> git.baikalelectronics.ru Git - kernel.git/commit
ipvlan: Fix insufficient skb linear check for arp
authorGao Feng <gfree.wind@vip.163.com>
Thu, 23 Nov 2017 03:47:11 +0000 (11:47 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Nov 2017 18:37:02 +0000 (03:37 +0900)
commitcf8fe391d313a23b0ac54bcdd4e91fe94e83a16a
tree069ad0802e58b2e5e56f7e76c394bc13b40e81eb
parent00952ec44fc42373b6cb200a516de4ae0d924fb6
ipvlan: Fix insufficient skb linear check for arp

In the function ipvlan_get_L3_hdr, current codes use pskb_may_pull to
make sure the skb header has enough linear room for arp header. But it
would access the arp payload in func ipvlan_addr_lookup. So it still may
access the unepxected memory.

Now use arp_hdr_len(port->dev) instead of the arp header as the param.

Signed-off-by: Gao Feng <gfree.wind@vip.163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_core.c