Message ID | 20130925085947.GY7660@secunet.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, 25 Sep 2013 10:59:47 +0200 Steffen Klassert wrote: > > > When trying to tunnel traffic originating from the same machine as the > > > tunnel endpoint, I am experiencing kernel panics for some types of > > > traffic (ICMP and UDP). TCP seems not to be affected by this, at least > > > I have not been able to trigger the panic. > > > > > > I have one tunnel (without an IP address) and use policy routing to > > > steer some traffic through the tunnels. > > [...] > > > An interesting thing is that I have seen different kernel panics being > > > triggered. The other one I have seen has RIP pointing to > > > e1000_xmit_frame() and the message "protocol 0800 is buggy". However, > > > the one I have posted is by far the most common. > > I'm experiencing the same issue on two different machines. It happens on any > > kernel starting from 3.10 when ip_tunnel/ip_tunnel_core were introduced. > > > Can you please try the patch below? > I've posted the same patch already to netdev in the morning. > > Subject: [PATCH net 1/2] ip_tunnel: Fix a memory corruption in ip_tunnel_xmit Thank you very much. All works fine with that patch applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Sep 25, 2013 at 10:59 AM, Steffen Klassert <steffen.klassert@secunet.com> wrote: > Can you please try the patch below? > I've posted the same patch already to netdev in the morning. Thank you very much for this patch. I am currently travelling, but will give it a try when I am back in the office next week. -Kristian -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index ac9fabe..b8ce640 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -641,13 +641,13 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev, max_headroom = LL_RESERVED_SPACE(rt->dst.dev) + sizeof(struct iphdr) + rt->dst.header_len; - if (max_headroom > dev->needed_headroom) { + if (max_headroom > dev->needed_headroom) dev->needed_headroom = max_headroom; - if (skb_cow_head(skb, dev->needed_headroom)) { - dev->stats.tx_dropped++; - dev_kfree_skb(skb); - return; - } + + if (skb_cow_head(skb, dev->needed_headroom)) { + dev->stats.tx_dropped++; + dev_kfree_skb(skb); + return; } err = iptunnel_xmit(rt, skb, fl4.saddr, fl4.daddr, protocol,