mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Netfilter Oops Solved
@ 2001-12-17  6:07 Edward Killips
  2001-12-17 12:54 ` Harald Welte
  0 siblings, 1 reply; 2+ messages in thread
From: Edward Killips @ 2001-12-17  6:07 UTC (permalink / raw)
  To: linux-kernel

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.


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

* Re: Netfilter Oops Solved
  2001-12-17  6:07 Netfilter Oops Solved Edward Killips
@ 2001-12-17 12:54 ` Harald Welte
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Welte @ 2001-12-17 12:54 UTC (permalink / raw)
  To: Edward Killips; +Cc: linux-kernel

On Mon, Dec 17, 2001 at 01:07:52AM -0500, Edward Killips wrote:
> I found the problem in the netfilter code. In the file ipt_TOS.c the 
> following code is wrong;

Thanks for pointing out this issue.  According to DaveM, this fix has already
been submitted to Marcelo for Kernel inclusion.

-- 
Live long and prosper
- Harald Welte / laforge@gnumonks.org               http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M- 
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)

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

end of thread, other threads:[~2001-12-17 13:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-17  6:07 Netfilter Oops Solved Edward Killips
2001-12-17 12:54 ` Harald Welte

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®