All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 10875] Oops in nf_nat_setup_info
@ 2008-06-06 18:05 Krzysztof Oledzki
  2008-06-06 22:47 ` Krzysztof Oledzki
  0 siblings, 1 reply; 10+ messages in thread
From: Krzysztof Oledzki @ 2008-06-06 18:05 UTC (permalink / raw)
  To: netfilter-devel; +Cc: bugme-daemon

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1847 bytes --]

Hello,

Today I have been plaing with the conntrackd utility and noticed it is 
very easy to trigger a kernel oops just by:

conntrackd -d
conntrackd -n
conntrackd -c
conntrackd -c

The oops is here: http://bugzilla.kernel.org/attachment.cgi?id=16414

I was trying to fix it with:

--- nf_nat_core.c	2008-06-06 19:55:25.000000000 +0200
+++ nf_nat_core.c	2008-05-07 01:22:34.000000000 +0200
@@ -153,7 +153,7 @@
         read_lock_bh(&nf_nat_lock);
         hlist_for_each_entry(nat, n, &bysource[h], bysource) {
                 ct = nat->ct;
-               if (ct && same_src(ct, tuple)) {
+               if (same_src(ct, tuple)) {
                         /* Copy source part from reply tuple. */
                         nf_ct_invert_tuplepr(result,
                                        &ct->tuplehash[IP_CT_DIR_REPLY].tuple);


However and I'm not able to find how nat->ct may become NULL in here and 
unfortutunatelly this patch does not help too much as with above fix I get 
a different Oops: http://bugzilla.kernel.org/attachment.cgi?id=16415

(gdb) l *nf_nat_setup_info+0x223
0x783e30de is in nf_nat_setup_info (net/ipv4/netfilter/nf_nat_core.c:154).
149             struct nf_conn_nat *nat;
150             struct nf_conn *ct;
151             struct hlist_node *n;
152
153             read_lock_bh(&nf_nat_lock);
154             hlist_for_each_entry(nat, n, &bysource[h], bysource) {        <- here
155                     ct = nat->ct;
156                     if (ct && same_src(ct, tuple)) {
157                             /* Copy source part from reply tuple. */
158                             nf_ct_invert_tuplepr(result,

All accesses to bysource seem to be protected by the lock_bh so I have no 
concept where to dig next. :( Any idea?

Best regards,


 				Krzysztof Olędzki

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

end of thread, other threads:[~2008-06-07 15:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-06 18:05 [Bug 10875] Oops in nf_nat_setup_info Krzysztof Oledzki
2008-06-06 22:47 ` Krzysztof Oledzki
2008-06-07 12:01   ` Patrick McHardy
2008-06-07 12:05     ` Patrick McHardy
2008-06-07 13:51       ` Krzysztof Oledzki
2008-06-07 13:54         ` Patrick McHardy
2008-06-07 14:58           ` Krzysztof Oledzki
2008-06-07 15:27             ` Patrick McHardy
2008-06-07 15:34               ` Krzysztof Oledzki
2008-06-07 13:27     ` Krzysztof Oledzki

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.