Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 321489 - net-firewall/fwbuilder-4.0.0/-3.0.7 segfault on import of iptables rules
Summary: net-firewall/fwbuilder-4.0.0/-3.0.7 segfault on import of iptables rules
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High critical
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-25 20:09 UTC by Lars
Modified: 2010-05-26 22:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
The file I tried to import. (iptables.dump,528 bytes, text/plain)
2010-05-25 20:32 UTC, Lars
Details
Backtrace (backtrace,710 bytes, text/plain)
2010-05-25 20:38 UTC, Lars
Details
The complete output of gdb including backtrace (full_gdb_output,16.15 KB, text/plain)
2010-05-25 22:01 UTC, Lars
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars 2010-05-25 20:09:27 UTC
fwbuilder-3.0.7 crashes with segmentation fault on a x86_64 gentoo system whenever I try to import iptables rules.

Reproducible: Always

Steps to Reproduce:
1. Dump the iptables rules to a file with
iptables-save > iptables.dump
2. Check that read and write access to generated file is given
3. Start fwbuilder
4. File -> Import Policies
5. Enter path to file 
6. Select Platform: iptables
7. Press Next

Actual Results:  
fwbuilder crashes.

Expected Results:  
Policies are imported.
Comment 1 Lars 2010-05-25 20:32:26 UTC
Created attachment 232913 [details]
The file I tried to import.
Comment 2 Lars 2010-05-25 20:38:14 UTC
Created attachment 232915 [details]
Backtrace

I emerged net-firewall/fwbuilder and net-libs/libfwbuilder with debugging symbols according to this guide;
http://www.gentoo.org/proj/en/qa/backtraces.xml

then called 
  gdb fwbuilder core

and got the trace with 
  where

Please tell me, if I should reemerge other applications, too. I have no experiences with backtraces.
Comment 3 Lars 2010-05-25 22:01:30 UTC
Created attachment 232923 [details]
The complete output of gdb including backtrace
Comment 4 Lars 2010-05-25 22:05:00 UTC
(In reply to comment #0)
> fwbuilder-3.0.7 crashes with segmentation fault on a x86_64 gentoo system
Sorry, I forgot to mention that this is also true for fwbuilder-4.0.0. The backtrace actually is taken from fwbuilder-4.0.0.
Comment 5 Lars 2010-05-26 22:52:57 UTC
According to Vadim Kurland it crashes inside ANTLR run-time library. Fwbuilder uses a modified variant of antlr 2.7. This library is compiled as part of fwbuilder if it is not already installed. I had it installed on my system and so fwbuilder relied on the existing lib instead of compiling its own. 

It is planned to switch to antlr 3 in the long run. Meanwhile starting
with v4.0.1 build 2936 fwbuilder will always use its own copy.

All this can be read here:
http://sourceforge.net/mailarchive/message.php?msg_name=201005250157.54701.hermes.trismegistos%40web.de

Now there are several options to workaround/solve this bug:
  * upgrade systems antlr to version 3. Fwbuilder-3.0.7 to -4.0.0 will then switch to its own antlr automatically. This is no option for me since all available ant versions in portage require antlr-2.7.7 and ant itself is required by eclipse-sdk
  * upgrade to fwbuilder-4.0.1. I did this by copying the ebuilds for fwbuilder- and libfwbuilder-4.0.0 to -4.0.1
The new ebuilds worked for me and can be found here:
Bug #318689