From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 3/3] iptables: fix undersized deletion mask creation
Date: Thu, 29 Oct 2009 23:55:51 +0100 [thread overview]
Message-ID: <4AEA1D77.3020706@trash.net> (raw)
In-Reply-To: <1256839878-24358-4-git-send-email-jengelh@medozas.de>
Jan Engelhardt wrote:
> The mask created for the -D rulespec is simply too small.
> xtables_targets points to whatever target has last been loaded, so
> xtables_targets->size is quite almost wrong, as we need to use the
> size of the target for the specific rule that is about to be deleted.
>
> This bug existed ever since iptables history is tracked, and requires
> certain circumstances to be visible, where the deletion operation is
> one. Furthermore, multiple userspace target extensions must have been
> loaded, and a target B whose .size is smaller than the target A of
> the rule we are about to delete must have been loaded more recently
> than target A. The minimal testcase is (rule 60007 gets wrongly
> removed)
>
> *nat
> -F
> -X
> -A POSTROUTING -p udp -j SNAT --to 192.168.1.1:60007
> -A POSTROUTING -p udp -j SNAT --to 192.168.1.1:60008
> -A POSTROUTING -p udp -j CONNMARK --set-mark 0
> -D POSTROUTING -p udp -j SNAT --to 192.168.1.1:60008
> COMMIT
>
> References: http://bugzilla.netfilter.org/show_bug.cgi?id=606
Very nice catch, thanks Jan.
next prev parent reply other threads:[~2009-10-29 22:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-29 18:11 (unknown), Jan Engelhardt
2009-10-29 18:11 ` [PATCH 1/3] build: restore --disable-ipv6 functionality on system w/o v6 headers Jan Engelhardt
2009-10-29 18:11 ` [PATCH 2/3] libiptc: fix wrong maptype of base chain counters on restore Jan Engelhardt
2009-10-29 18:11 ` [PATCH 3/3] iptables: fix undersized deletion mask creation Jan Engelhardt
2009-10-29 22:55 ` Patrick McHardy [this message]
2009-10-29 22:26 ` Patrick McHardy
2009-10-29 22:51 ` Re: Jan Engelhardt
2009-10-29 22:55 ` Re: Patrick McHardy
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=4AEA1D77.3020706@trash.net \
--to=kaber@trash.net \
--cc=jengelh@medozas.de \
--cc=netfilter-devel@vger.kernel.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 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).