stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ip6_gre: clear IPCB in ip6gre_xmit2 in case dst_link_failure called
@ 2016-02-09  4:07 Bernie Harris
  2016-02-16  1:10 ` [PATCH v2] gre: Avoid kernel panic by clearing IPCB before " Bernie Harris
  2016-02-17 15:26 ` [PATCH] ip6_gre: clear IPCB in ip6gre_xmit2 in case " David Miller
  0 siblings, 2 replies; 9+ messages in thread
From: Bernie Harris @ 2016-02-09  4:07 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuznet, stable, bernie.harris

skb->cb may contain data from previous layers (in the observed case the
qdisc layer). In the observed scenario, the data was misinterpreted as
ip header options, which later caused the ihl to be set to an invalid
value (<5). This resulted in an infinite loop in the mips implementation
of ip_fast_csum.

This patch clears IPCB before dst_link_failure is called, similar to what
commit 11c21a30 does for the ipv4 case.

Signed-off-by: Bernie Harris <bernie.harris@alliedtelesis.co.nz>
---
 net/ipv6/ip6_gre.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index f37f18b..e820345 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -678,6 +678,7 @@ static netdev_tx_t ip6gre_xmit2(struct sk_buff *skb,
 				tunnel->err_time + IP6TUNNEL_ERR_TIMEO)) {
 			tunnel->err_count--;
 
+			memset(IPCB(skb), 0, sizeof(*IPCB(skb)));
 			dst_link_failure(skb);
 		} else
 			tunnel->err_count = 0;
-- 
2.7.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-02-24  0:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09  4:07 [PATCH] ip6_gre: clear IPCB in ip6gre_xmit2 in case dst_link_failure called Bernie Harris
2016-02-16  1:10 ` [PATCH v2] gre: Avoid kernel panic by clearing IPCB before " Bernie Harris
2016-02-17 21:31   ` David Miller
2016-02-22  4:57     ` Bernie Harris
2016-02-21 23:24   ` Bernie Harris
2016-02-21 23:24     ` [PATCH v3] tunnel: Clear IPCB(skb)->opt before dst_link_failure called Bernie Harris
2016-02-21 23:58   ` Bernie Harris
2016-02-24  0:12     ` David Miller
2016-02-17 15:26 ` [PATCH] ip6_gre: clear IPCB in ip6gre_xmit2 in case " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).