Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 179496 - net-analyzer/ipac-ng-1.31 - fetchipac -S segfaults with rules using extensions
Summary: net-analyzer/ipac-ng-1.31 - fetchipac -S segfaults with rules using extensions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-23 09:12 UTC by arno
Modified: 2007-06-06 08:01 UTC (History)
0 users

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


Attachments
Only call init-function of extension when m->init != NULL (ipac-ng-1.31-init-ext.patch,731 bytes, patch)
2007-05-23 09:14 UTC, arno
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description arno 2007-05-23 09:12:10 UTC
Given this rule in /etc/ipac-ng/rules.conf:
example|ipac~o|+|tcp|||helper --helper "ftp"|
fetchipac -S segfaults when trying to process this rule

Reproducible: Always

Steps to Reproduce:
1. create a rule.conf with above rule
2. fetchipac -S
3. see fetchipac segfaulting

Actual Results:  
SegFault

Expected Results:  
corresponding rule in chain ipac~o

$ emerge --info
Portage 2.1.2.7 (default-linux/x86/2007.0/desktop, gcc-4.1.1, glibc-2.5-r2, 2.6.17.13 i686)
=================================================================
System uname: 2.6.17.13 i686 AMD Athlon(tm) XP 2400+
Gentoo Base System release 1.12.9
Timestamp of tree: Wed, 23 May 2007 02:20:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r5
dev-lang/python:     2.3.5-r3, 2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://trumpetti.atm.tut.fi/gentoo"
LINGUAS="de en"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac acl acpi alsa apache2 arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt cups curl dbus dri dvd dvdr dvdread eds emboss encode esd evo fam ffmpeg firefox flac fortran gdbm gif gpm gstreamer gtk2 hal iconv idn ipv6 isdnlog java jpeg kde kdeenablefinal kerberos ldap libg++ lm_sensors mad midi mikmod mmx mmx2 mozilla mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin ogg opengl openmp oss pam pcre pdf perl png pppd python qt qt3 qt3support qt4 quicktime readline real reflection samba sdl session slang spell spl sse ssl svg svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts unicode vorbis win32codecs winbind x86 xcomposite xine xinerama xml xorg xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="radeon nv vesa vga"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

fetchipac crashes in this case because it tries to call the init-function of libipt_helper.so (line 1382 of agents/iptables/iptables.c of already patched file). Unfortunately the libipt_helper.so does not have an init-function.

It should be checked if (m->init != NULL) before trying to call this function ptr.

Same could happen in line 1333.
Comment 1 arno 2007-05-23 09:14:30 UTC
Created attachment 120065 [details, diff]
Only call init-function of extension when m->init != NULL
Comment 2 Markus Ullmann (RETIRED) gentoo-dev 2007-06-06 08:01:41 UTC
added as -r3, thanks for the patch and keep up the good work :)