Re: [Patch net] ipv6: check skb->protocol before lookup for nexthop

2017-04-26 Thread David Miller
From: Cong Wang Date: Tue, 25 Apr 2017 14:37:15 -0700 > Andrey reported a out-of-bound access in ip6_tnl_xmit(), this > is because we use an ipv4 dst in ip6_tnl_xmit() and cast an IPv4 > neigh key as an IPv6 address: > > neigh = dst_neigh_lookup(skb_dst(skb), >

[Patch net] ipv6: check skb->protocol before lookup for nexthop

2017-04-25 Thread Cong Wang
Andrey reported a out-of-bound access in ip6_tnl_xmit(), this is because we use an ipv4 dst in ip6_tnl_xmit() and cast an IPv4 neigh key as an IPv6 address: neigh = dst_neigh_lookup(skb_dst(skb), &ipv6_hdr(skb)->daddr); if (!neigh) g