ipv6: fix panic when forwarding a pkt with no in6 dev
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Fri, 8 Apr 2022 14:03:42 +0000 (16:03 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2022 11:28:43 +0000 (12:28 +0100)
commite3fa461d8b0e185b7da8a101fe94dfe6dd500ac0
tree13667a931f60d0a36453102b789126c46f58a183
parent1a7eb80d170c28be2928433702256fe2a0bd1e0f
ipv6: fix panic when forwarding a pkt with no in6 dev

kongweibin reported a kernel panic in ip6_forward() when input interface
has no in6 dev associated.

The following tc commands were used to reproduce this panic:
tc qdisc del dev vxlan100 root
tc qdisc add dev vxlan100 root netem corrupt 5%

CC: stable@vger.kernel.org
Fixes: ccd27f05ae7b ("ipv6: fix 'disable_policy' for fwd packets")
Reported-by: kongweibin <kongweibin2@huawei.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_output.c