From: Hangbin Liu <liuhang...@gmail.com> Date: Thu, 22 Aug 2019 22:19:47 +0800
> When we send a packet larger than PMTU, we need to reply with > icmp_send(ICMP_FRAG_NEEDED) or icmpv6_send(ICMPV6_PKT_TOOBIG). > > But with collect_md mode, kernel will crash while accessing the dst dev > as __metadata_dst_init() init dst->dev to NULL by default. Here is what > the code path looks like, for GRE: ... > We could not fix it in __metadata_dst_init() as there is no dev supplied. > Look in to the __icmp_send()/decode_session{4,6} code we could find the dst > dev is actually not needed. In __icmp_send(), we could get the net by > skb->dev. > For decode_session{4,6}, as it was called by xfrm_decode_session_reverse() > in this scenario, the oif is not used by > fl4->flowi4_oif = reverse ? skb->skb_iif : oif; > > The reproducer is easy: ... Series applied, and queued up for -stable, thanks!