[PATCH] IPv6: Fix BUG When Received Unknown Protocol

STALE8668d

2 messages, 2 authors, 2002-11-22 · open the first message on its own page

[PATCH] IPv6: Fix BUG When Received Unknown Protocol

From: YOSHIFUJI Hideaki / 吉藤英明 <hidden>
Date: 2002-11-21 06:26:55

Hi,

Since 2.5.43, kernel panics by executing BUG() when
received unknown protocol in IPv6 packet. 
This is because ip6_input_finish() try to kfree_skb() 
while icmpv6_param_prob() has already kfree_skb()'ed the skb.

Thanks.

Patch-Name: Fix BUG When Received Unknown Protocol
Patch-Author: YOSHIFUJI Hideaki / USAGI Project [off-list ref]
Index: net/ipv6/ip6_input.c
===================================================================
RCS file: /cvsroot/usagi/usagi/kernel/linux25/net/ipv6/ip6_input.c,v
retrieving revision 1.1.1.3
retrieving revision 1.2
diff -u -r1.1.1.3 -r1.2
--- net/ipv6/ip6_input.c	31 Oct 2002 03:58:27 -0000	1.1.1.3
+++ net/ipv6/ip6_input.c	21 Nov 2002 05:30:59 -0000	1.2
@@ -182,9 +182,10 @@
 		if (!raw_sk) {
 			IP6_INC_STATS_BH(Ip6InUnknownProtos);
 			icmpv6_param_prob(skb, ICMPV6_UNK_NEXTHDR, nhoff);
-		} else
+		} else {
 			IP6_INC_STATS_BH(Ip6InDelivers);
-		kfree_skb(skb);
+			kfree_skb(skb);
+		}
 	}
 
 	return 0;
-- 
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF  80D8 4807 F894 E062 0EEA

Re: [PATCH] IPv6: Fix BUG When Received Unknown Protocol

From: David S. Miller <hidden>
Date: 2002-11-22 05:52:25

   From: YOSHIFUJI Hideaki / 吉藤英明 [off-list ref]
   Date: Thu, 21 Nov 2002 01:32:03 -0500 (EST)

   Since 2.5.43, kernel panics by executing BUG() when
   received unknown protocol in IPv6 packet. 
   This is because ip6_input_finish() try to kfree_skb() 
   while icmpv6_param_prob() has already kfree_skb()'ed the skb.

Patch applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help