netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.6.20 04/10] nfnetlink_log: fix possible use-after-free
@ 2007-02-12  0:39 Michał Mirosław
  2007-02-13 12:47 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Mirosław @ 2007-02-12  0:39 UTC (permalink / raw)
  To: netfilter-devel; +Cc: linux-kernel

Paranoia: instance_put() might have freed the inst pointer when we
spin_unlock_bh().

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

--- linux-2.6.20/net/netfilter/nfnetlink_log.c.2	2007-02-11 20:43:24.000000000 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c	2007-02-11 20:46:33.000000000 +0100
@@ -393,8 +393,8 @@ static void nfulnl_timer(unsigned long d
 
 	spin_lock_bh(&inst->lock);
 	__nfulnl_send(inst);
-	instance_put(inst);
 	spin_unlock_bh(&inst->lock);
+	instance_put(inst);
 }
 
 /* This is an inline function, we don't really care about a long

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

* Re: [PATCH 2.6.20 04/10] nfnetlink_log: fix possible use-after-free
  2007-02-12  0:39 [PATCH 2.6.20 04/10] nfnetlink_log: fix possible use-after-free Michał Mirosław
@ 2007-02-13 12:47 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2007-02-13 12:47 UTC (permalink / raw)
  To: Michał Mirosław; +Cc: netfilter-devel, linux-kernel

Micha³ Miros³aw wrote:
> Paranoia: instance_put() might have freed the inst pointer when we
> spin_unlock_bh().

Applied, I'll forward this one to -stable as well.

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

end of thread, other threads:[~2007-02-13 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-12  0:39 [PATCH 2.6.20 04/10] nfnetlink_log: fix possible use-after-free Michał Mirosław
2007-02-13 12:47 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).