mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "YOSHIFUJI Hideaki / 吉藤英明" <yoshfuji@linux-ipv6.org>
To: linux-kernel@vger.kernel.org, netdev@oss.sgi.com
Cc: davem@redhat.com, kuznet@ms2.inr.ac.ru.ee.t.u-tokyo.ac.jp,
	usagi@linux-ipv6.org
Subject: [PATCH] IPv6: Fix BUG When Received Unknown Protocol
Date: Thu, 21 Nov 2002 01:32:03 -0500 (EST)	[thread overview]
Message-ID: <20021121.013203.100868154.yoshfuji@linux-ipv6.org> (raw)

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 <yoshfuji@linux-ipv6.org>
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

             reply	other threads:[~2002-11-21  6:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-21  6:32 YOSHIFUJI Hideaki / 吉藤英明 [this message]
2002-11-22  5:56 ` David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021121.013203.100868154.yoshfuji@linux-ipv6.org \
    --to=yoshfuji@linux-ipv6.org \
    --cc=davem@redhat.com \
    --cc=kuznet@ms2.inr.ac.ru.ee.t.u-tokyo.ac.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    --cc=usagi@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®