]> 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)
commit806dfdb0ebb4c8612f1af267fec63c15087d1b65
treefab014093c87a41e24744e4fcffbf355800fc384
parent9c1a34d1e9ce28312a854cac9f4d5482ab78992b
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