Skip to content

Commit adee01b

Browse files
NicolasDichtelgregkh
authored andcommitted
ipv6: fix panic when forwarding a pkt with no in6 dev
commit e3fa461 upstream. 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: [email protected] Fixes: ccd27f0 ("ipv6: fix 'disable_policy' for fwd packets") Reported-by: kongweibin <[email protected]> Signed-off-by: Nicolas Dichtel <[email protected]> Reviewed-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cab64cb commit adee01b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/ip6_output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ int ip6_forward(struct sk_buff *skb)
485485
goto drop;
486486

487487
if (!net->ipv6.devconf_all->disable_policy &&
488-
!idev->cnf.disable_policy &&
488+
(!idev || !idev->cnf.disable_policy) &&
489489
!xfrm6_policy_check(NULL, XFRM_POLICY_FWD, skb)) {
490490
__IP6_INC_STATS(net, idev, IPSTATS_MIB_INDISCARDS);
491491
goto drop;

0 commit comments

Comments
 (0)