From: Rusty Russell <rusty@rustcorp.com.au>
To: Andy Polyakov <appro@fy.chalmers.se>
Cc: Harald Welte <laforge@netfilter.org>,
coreteam@netfilter.org,
Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>,
davem@redhat.com
Subject: Re: [netfilter-core] linux-2.6.0-testX ipchains oops in NAT
Date: Sun, 26 Oct 2003 17:19:38 +1100 [thread overview]
Message-ID: <20031026063626.D0FCE2C04B@lists.samba.org> (raw)
In-Reply-To: Your message of "Thu, 23 Oct 2003 13:16:04 +0200." <3F97B874.CB12C184@fy.chalmers.se>
In message <3F97B874.CB12C184@fy.chalmers.se> you write:
> It's perfectly reproducible with eth0:1. In other words I
Thanks for the excellent help Andy!
Found it by inspection from Andy's description.
We updated ip_nat_setup_info to set the initialized flag and call
place_in_hashes, but *didn't* change the call in ip_fw_compat_masq.c
which also calls place_in_hashes() itself (again!). Result: corrupt
list, and next thing which lands in the same hash bucket goes boom.
This should fix it.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Name: ipchains/ipfwadm compat changes for new ip_nat_setup_info
Author: Rusty Russell
Status: Experimental
D: We updated ip_nat_setup_info to set the initialized flag and call
D: place_in_hashes, but *didn't* change the call in ip_fw_compat_masq.c
D: which also calls place_in_hashes() itself (again!). Result: corrupt
D: list, and next thing which lands in the same hash bucket goes boom.
D:
D: Thanks to Andy Polyakov for chasing this down.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .17896-linux-2.6.0-test9/net/ipv4/netfilter/ip_fw_compat_masq.c .17896-linux-2.6.0-test9.updated/net/ipv4/netfilter/ip_fw_compat_masq.c
--- .17896-linux-2.6.0-test9/net/ipv4/netfilter/ip_fw_compat_masq.c 2003-09-22 10:28:14.000000000 +1000
+++ .17896-linux-2.6.0-test9.updated/net/ipv4/netfilter/ip_fw_compat_masq.c 2003-10-26 17:17:30.000000000 +1100
@@ -91,9 +91,6 @@ do_masquerade(struct sk_buff **pskb, con
WRITE_UNLOCK(&ip_nat_lock);
return ret;
}
-
- place_in_hashes(ct, info);
- info->initialized = 1;
} else
DEBUGP("Masquerading already done on this conn.\n");
WRITE_UNLOCK(&ip_nat_lock);
next prev parent reply other threads:[~2003-10-26 6:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3F964F9D.D5C69498@fy.chalmers.se>
2003-10-23 9:02 ` [netfilter-core] linux-2.6.0-testX ipchains oops in NAT Harald Welte
2003-10-23 9:52 ` Andy Polyakov
2003-10-23 10:57 ` Harald Welte
2003-10-23 14:29 ` Andy Polyakov
2003-10-23 11:16 ` Andy Polyakov
2003-10-23 11:26 ` Andy Polyakov
2003-10-26 6:19 ` Rusty Russell [this message]
2003-10-26 13:31 ` Andy Polyakov
2003-10-27 7:58 ` David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031026063626.D0FCE2C04B@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=appro@fy.chalmers.se \
--cc=coreteam@netfilter.org \
--cc=davem@redhat.com \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.