From: Amin Azez <azez@ufomechanic.net>
To: Roberto Nibali <ratz@drugphish.ch>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: iptables 1.3.1 crashes on iptables-restore
Date: Thu, 04 Aug 2005 17:24:49 +0100 [thread overview]
Message-ID: <42F24151.1090702@ufomechanic.net> (raw)
In-Reply-To: <424BB242.6070809@drugphish.ch>
Roberto Nibali wrote:
>> when I try to do a iptables-restore with about 800 lines I get a
>> segmentation fault.
>> What is the most expediant way to track this problem down ?
>
>
> o Compile and link iptables with debugging info.
> o Before you run the command make sure you have the core file size
> settings to unlimited (ulimit -c unlimited).
> o Run your command.
> o You should have a core file in your directory.
> o gdb -q core /path/to/iptables-restore
> o bt
>
> Send the output to this list. Hope that is expedient enough ;).
I haven't seen any follow-up here but I am also having problems with
hanging and segfaulting with iptables-restore 1.3.1
If I re-order the rules, the problem changes or goes away.
With one combination of rules, I get a sefault with a backtrace as shown
here.
(I am using layer7 in some of my rules)
#0 0x4207418b in _int_malloc () from /lib/tls/libc.so.6
#1 0x42073a5e in calloc () from /lib/tls/libc.so.6
#2 0x0804aa19 in fw_calloc (count=1, size=8484) at iptables.c:514
#3 0x0804d4ce in do_command (argc=13, argv=0x8057660, table=0x8057668,
handle=0xbfffcdec) at iptables.c:2096
#4 0x0804a0fb in main (argc=-1073753484, argv=0xbffffa94) at
iptables-restore.c:401
#5 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6
In this case the segfault occured while processing this rule (mangle table):
-A staticentries -m layer7 --l7proto html -j MARK --set-mark 0x1
but does not occur if I remove this rule which is processed much earlier on:
-A layer7entries -m layer7 --l7proto msnmessenger -j RETURN
To me this indicates memory corruption at some point early on, I would
blame layer7 apart from the report here that I am responding to.
In another case where iptables-restore hangs, strace shows:
...
open("/etc/l7-protocols/protocols/rdp.pat", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=661, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7ede000
read(5, "# RDP - Remote Desktop Protocol "..., 4096) = 661
futex(0x83e2b98, FUTEX_WAKE, 1, ptrace: umoven: Input/output error
{...}) = 0
futex(0x83e2b98, FUTEX_WAIT, -7, NULL
The interesting point being the blocked futex which to me indicates
(guessing) that the kernel was sent some dodgy iptables soup and is
choking on it.
I'm debugging further to see where this is happening but thought it post
here with what I have.
iptables 1.3.3 doesn't segfault but does hang.
Sam
next prev parent reply other threads:[~2005-08-04 16:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-30 3:46 iptables 1.3.1 crashes on iptables-restore Alexander Samad
2005-03-31 8:18 ` Roberto Nibali
2005-08-04 16:24 ` Amin Azez [this message]
2005-08-05 10:08 ` Amin Azez
2005-08-05 12:57 ` Fixed " Amin Azez
2005-08-05 13:22 ` Roberto Nibali
2005-08-08 15:45 ` Amin Azez
2005-08-08 15:56 ` Roberto Nibali
2005-08-08 16:03 ` Amin Azez
2005-08-08 16:19 ` Roberto Nibali
2005-08-08 16:28 ` Amin Azez
2005-08-08 16:46 ` Roberto Nibali
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=42F24151.1090702@ufomechanic.net \
--to=azez@ufomechanic.net \
--cc=netfilter-devel@lists.netfilter.org \
--cc=ratz@drugphish.ch \
/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.