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

In the function ipvlan_get_L3_hdr, current codes use pskb_may_pull to
make sure the skb header has enough linear room for ipv6 header. But it
would use the latter memory directly without linear check when it is icmp.
So it still may access the unepxected memory in ipvlan_addr_lookup.

Now invoke the pskb_may_pull again if it is ipv6 icmp.

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