[PATCH 2.6.20 04/10] nfnetlink_log: fix possible use-after-free
Michał Mirosław
mirq-linux at rere.qmqm.pl
Mon Feb 12 01:39:06 CET 2007
Paranoia: instance_put() might have freed the inst pointer when we
spin_unlock_bh().
Signed-off-by: Michał Mirosław <mirq-linux at 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
More information about the netfilter-devel
mailing list