This is a note to let you know that I've just added the patch titled
ip_tunnel: Do not use stale inner_iph pointer.
to the 3.11-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ip_tunnel-do-not-use-stale-inner_iph-pointer.patch
and it can be found in the queue-3.11 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 272f4528d4d707788bc4d701e8d5c44d83a2fd58 Mon Sep 17 00:00:00 2001
From: Pravin B Shelar <[email protected]>
Date: Wed, 25 Sep 2013 09:57:47 -0700
Subject: ip_tunnel: Do not use stale inner_iph pointer.
From: Pravin B Shelar <[email protected]>
[ Upstream commit d4a71b155c12d0d429c6b69d94076d6d57e2a7a7 ]
While sending packet skb_cow_head() can change skb header which
invalidates inner_iph pointer to skb header. Following patch
avoid using it. Found by code inspection.
This bug was introduced by commit 0e6fbc5b6c6218 (ip_tunnels: extend
iptunnel_xmit()).
Signed-off-by: Pravin B Shelar <[email protected]>
Acked-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
net/ipv4/ip_tunnel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/ipv4/ip_tunnel.c
+++ b/net/ipv4/ip_tunnel.c
@@ -626,6 +626,7 @@ void ip_tunnel_xmit(struct sk_buff *skb,
tunnel->err_count = 0;
}
+ tos = ip_tunnel_ecn_encap(tos, inner_iph, skb);
ttl = tnl_params->ttl;
if (ttl == 0) {
if (skb->protocol == htons(ETH_P_IP))
@@ -655,7 +656,7 @@ void ip_tunnel_xmit(struct sk_buff *skb,
err = iptunnel_xmit(dev_net(dev), rt, skb,
fl4.saddr, fl4.daddr, protocol,
- ip_tunnel_ecn_encap(tos, inner_iph, skb), ttl, df);
+ tos, ttl, df);
iptunnel_xmit_stats(err, &dev->stats, dev->tstats);
return;
Patches currently in stable-queue which might be from [email protected] are
queue-3.11/ip_tunnel-fix-a-memory-corruption-in-ip_tunnel_xmit.patch
queue-3.11/ip_tunnel-do-not-use-stale-inner_iph-pointer.patch
queue-3.11/ip_tunnel_core-change-__skb_push-back-to-skb_push.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html