All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH, RFC] possible use of freed skbuff in netfilter.c
@ 2003-04-25 17:57 Bart De Schuymer
  2003-04-29 14:51 ` Harald Welte
  0 siblings, 1 reply; 5+ messages in thread
From: Bart De Schuymer @ 2003-04-25 17:57 UTC (permalink / raw)
  To: David S.Miller; +Cc: Rusty Russel, netfilter-devel

Hello Dave,

When dev_put'ing bridge devices in netfilter.c::reinject the skb can already 
be freed. The patch below fixes this by delaying the freeing of the skb a 
bit. AFAIK, calling kfree_skb outside the read_lock causes no problems.
Could someone of the netfilter core team approve or disapprove this change?
This is bug 86 of the netfilter bugtracking system.

cheers,
Bart

--- linux-2.5.68/net/core/netfilter.c.old	Fri Apr 25 19:23:35 2003
+++ linux-2.5.68/net/core/netfilter.c	Fri Apr 25 19:24:47 2003
@@ -559,10 +559,6 @@
 		nf_queue(skb, elem, info->pf, info->hook, 
 			 info->indev, info->outdev, info->okfn);
 		break;
-
-	case NF_DROP:
-		kfree_skb(skb);
-		break;
 	}
 	br_read_unlock_bh(BR_NETPROTO_LOCK);
 
@@ -578,6 +574,10 @@
 	}
 #endif
 
+
+	if (verdict == NF_DROP)
+		kfree_skb(skb);
+
 	kfree(info);
 	return;
 }

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

end of thread, other threads:[~2003-04-30 16:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-25 17:57 [PATCH, RFC] possible use of freed skbuff in netfilter.c Bart De Schuymer
2003-04-29 14:51 ` Harald Welte
2003-04-30  6:54   ` David S. Miller
2003-04-30 16:24     ` Bart De Schuymer
2003-04-30 16:37     ` Harald Welte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.