Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 101776 - net-firewall/fwbuilder - fwb_ipt: stack smashing attack (fwbuilder)
Summary: net-firewall/fwbuilder - fwb_ipt: stack smashing attack (fwbuilder)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 135265
  Show dependency tree
 
Reported: 2005-08-08 11:50 UTC by Tobias Wahl
Modified: 2007-11-10 10:16 UTC (History)
1 user (show)

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


Attachments
This is the firewall configuration, which causes the error (firewall.fwb,33.82 KB, application/octet-stream)
2005-08-11 22:37 UTC, Tobias Wahl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Wahl 2005-08-08 11:50:25 UTC
fwbuilder does not compile my firewall

fwbuilder is compiled with a hardened gcc, now I can edit my firewall
configuration, but I can not compile it.  the fwb_ipt (firewall-compiler)
crashes with the message

fwb_ipt: stack smashing attack in function libfwbuilder::Interface*
fwcompiler::Compiler::findInterfaceFor(const libfwbuilder::Address*, const
libfwbuilder::Address*)()


Reproducible: Always
Steps to Reproduce:
1. fwb_ipt -f firewall.fwb -d ./ arrakis

Actual Results:  
fwb_ipt crashes

Expected Results:  
it should create my firewall-script
Comment 1 solar (RETIRED) gentoo-dev 2005-08-08 14:25:00 UTC
emerge info etc.
Comment 2 Tobias Wahl 2005-08-10 03:44:03 UTC
(In reply to comment #1)
> emerge info etc.

gcc-3.3.5.20050130-r1  (-altivec) -bootstrap -boundschecking -build +fortran
+gcj +gtk +hardened -ip28 (-multilib) -multislot (-n32) (-n64) +nls -nocxx
-nopie -nossp -objc -static

libfwbuilder +snmp +ssl
fwbuilder +nls

i have tried the (lib)fwbuilder with ~x86 (2.08) and without (2.06)

Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2005-08-10 08:37:45 UTC
Please paste _all_ the output of the command 'emerge info'.
Comment 4 Tobias Wahl 2005-08-10 11:56:39 UTC
(In reply to comment #3)
> Please paste _all_ the output of the command 'emerge info'.

Ahhh, ... OK.
Here we go:

ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -mcpu=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env
/usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -mcpu=i686 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="de_DE.UTF-8"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac aalib aim alsa apache2 apm arts audiofile avi bash-completion
bcmath berkdb bitmap-fonts bonobo bzip2 cdparanoia cdr cjk crypt ctype cups curl
db2 dga dio directfb divx4linux doc dv dvb dvd dvdr dvdread eds emacs emacs-w3
emboss encode esd examples exif expat fam fastcgi fbcon ffmpeg fftw flac
foomaticdb fortran ftp gb gcj gd gdbm gif ginac glut gmp gnome gphoto2 gpm gps
gstreamer gtk gtk2 gtkhtml hardened hardenedphp icq imagemagick imap imlib ipv6
java javascript jpeg junit kde kerberos krb4 lcms leim libg++ libwww mad maildir
mailwrapper mbox memlimit mikmod mime mmap mmx mng mono motif mozilla mp3 mpeg
msn mule mysql nas ncurses nis nls nptl ogg oggvorbis opengl oscar oss pam
pcmcia pcre pdflib perl php plotutils png posix postgres python qt quicktime
readline ruby samba sasl scanner sdl skey slang snmp sockets socks5 sox speex
spell spl sqlite sse ssl svg svga symlink tcltk tcpd test tetex threads tidy
tiff tokenizer truetype truetype-fonts type1-fonts unicode usb v4l vcd vhosts
vorbis win32codecs wxwindows xface xine xml xml2 xmlrpc xmms xpm xsl xv xvid
yahoo zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTDIR_OVERLAY
Comment 5 Kevin F. Quinn (RETIRED) gentoo-dev 2005-08-11 14:08:09 UTC
ok; I've confirmed it fails with ssp switched on, but not with ssp switched off.
It's quite probable that it's a bug in ssp, but more investigation needed.

I'll comment again later, if I figure anything out.
Comment 6 Kevin F. Quinn (RETIRED) gentoo-dev 2005-08-11 16:04:03 UTC
Hmm; just built no-pie but _with_ ssp and it doesn't crash - however I'm using
gcc 3.4.4 and I get a segfault with ssp+pie not a stack smash - I would guess
I'm not seeing the same problem originally reported,

To summarise so far; for me:
pie+ssp -> segfault
pie -> no segfault (-fno-stack-protector)
ssp -> no segfault (-fno-pie)

Tobias - could you attach the firewall.fwb file you're using (if it's not a
secret)?  Or alternatively try to craft something else that results in the same
crash and attach it here.
Comment 7 Tobias Wahl 2005-08-11 22:37:24 UTC
Created attachment 65726 [details]
This is the firewall configuration, which causes the error
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2007-07-12 13:56:40 UTC
Is this still even remotely relevant with current ebuilds, such as 2.1.10?
Comment 9 Carlos Silva (RETIRED) gentoo-dev 2007-07-25 18:50:00 UTC
Guys, what do you want to do with this bug? I can't test it but the bug is really _OLD_...
Comment 10 Christian Heim (RETIRED) gentoo-dev 2007-11-10 10:16:42 UTC
(In reply to comment #9)
> Guys, what do you want to do with this bug? I can't test it but the bug is
> really _OLD_...

Yes, and it is fixed right now, after rebuilding QT.