mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Edward Killips" <etkillips@hotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Netfilter Oops Solved
Date: Mon, 17 Dec 2001 01:07:52 -0500	[thread overview]
Message-ID: <F141o1ujjSkZSvx5bd600005006@hotmail.com> (raw)

I found the problem in the netfilter code. In the file ipt_TOS.c the 
following code is wrong;
if(!nskb)
     return NF_DROP;
*pskb = nskb;            <---this should be down 1 line
kfree_skb(*pksb);        <-- pointer is freed here
iph = (*pksb)->nh.iph;   <-- freed pointer is used here.

The following patch fixes the problem.

--- ipt_TOS.c.orig	Mon Dec 17 00:33:50 2001
+++ ipt_TOS.c	Mon Dec 17 00:34:18 2001
@@ -27,8 +27,8 @@
			struct sk_buff *nskb = skb_copy(*pskb, GFP_ATOMIC);
			if (!nskb)
				return NF_DROP;
-			*pskb = nskb;
			kfree_skb(*pskb);
+			*pskb = nskb;
			iph = (*pskb)->nh.iph;
		}



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


             reply	other threads:[~2001-12-17  6:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-17  6:07 Edward Killips [this message]
2001-12-17 12:54 ` Harald Welte

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=F141o1ujjSkZSvx5bd600005006@hotmail.com \
    --to=etkillips@hotmail.com \
    --cc=linux-kernel@vger.kernel.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®