Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 141235 - net-misc/efax-0.9a Segmentation Fault
Summary: net-misc/efax-0.9a Segmentation Fault
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-20 21:31 UTC by Keef Aragon
Modified: 2007-11-04 14:19 UTC (History)
1 user (show)

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


Attachments
Easy patch that fixes segfault (efaxmsg.va_start_stack_clobber.patch,1.15 KB, patch)
2006-07-20 21:32 UTC, Keef Aragon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keef Aragon 2006-07-20 21:31:05 UTC
perhaps this is only an amd64 issue.  In int msg() inside of efaxmsg.c va_start is called before a whole bunch of other processing and then the passed va_list is used in a vfprintf call.  The "whole bunch of stuff" appears to clobber the stack as the va_list "sees" it.  As such, efax will on occasion (in my case always just different iterations of msg() each time) crash. 

Portage 2.1.1_pre3-r3 (default-linux/amd64/2005.1, gcc-4.1.1/amd64-vanilla, glibc-2.4-r3, 2.6.14-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.14-gentoo-r2 x86_64 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.12.0_pre17
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.3.5, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -fomit-frame-pointer -funroll-loops -finline-functions -pipe -march=athlon64"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /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/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -fomit-frame-pointer -funroll-loops -finline-functions -pipe -march=athlon64"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en-US ja-JP"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d a52 aac aalib alsa apache2 arts asf avi berkdb big-tables bitmap-fonts bootsplash cairo cddb cegui cg chroot cjk cle266 cli cluster crypt css cups devil divx4linux dlloader doc dri dts dvd dvdr dvdread eds emboss encode ffmpeg foomaticdb fortran geometry gif glibc-omitfp gnome gpm gstreamer gtk gtk2 imlib immqt ipv6 isdnlog ithreads javascript jpeg jpeg2k kde ldap libcaca lzw lzw-tiff maya-shaderlibrary mmap mozcalendar mozsvg mp3 mpeg mpm-worker mysql ncurses network nls nptl nptlonly nsplugin nvidia odbc ogg openexr opengl pam pcre pda pdflib perforce perl png pppd python qt qt3 qt4 quicktime readline reflection ruby scanner sdl session sndfile spell spl sql sqlite ssl subversion tcpd tidy tiff truetype-fonts type1-fonts unicode usb utf8 v4l v4l2 vcd vorbis win32codex xinerama xml xorg xpm xv xvmc zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_en-US linguas_ja-JP userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Keef Aragon 2006-07-20 21:32:51 UTC
Created attachment 92369 [details, diff]
Easy patch that fixes segfault

Just moved the va_start and va_end around and all looks good.
Comment 2 Keef Aragon 2006-07-20 21:39:55 UTC
I suppose the command would be of help to reproduce.  I originally used the "fax" command with numbers X'ed out:

fax CLASSINIT="-o1" NAME='"Keef Aragon"' DEV=ttyS0 PAGE='letter' FROM='"+1 XXX XXX XXXX"' -v send 'XXXXXXXXXX' Desktop/XXXXXXXXXX.ps

which uses efix and calls:

efax -v "chewmainrxtf" -v "chewmainrxtf" -d/dev/ttyS0 -x /var/lock/LCK..ttyS0 -iZ '-i&FE0&D2S7=120' '-i&C0' -iM1L0 -o1    -l "+1 XXX XXX XXXX" -kZ  -h "2006/07/20 15:47 +1 XXX XXX XXXX Keef Aragon p. %d/%d" -t "TXXXXXXXXXX"  /home/karagon/Desktop/XXXXXXXXXX.ps.[0-9][0-9][0-9]
Comment 3 Billy DeVincentis 2007-09-21 01:52:16 UTC
I can also confirm that the patch works, and this really needs to be corrected in the ebuild. Unfortunately hylafax doesnt work on amd64 and this makes efax that much more important. Someone please fix this in the ebuild.
Comment 4 Charlie Shepherd (RETIRED) gentoo-dev 2007-11-04 14:19:48 UTC
Patch committed, can you guys test this, as I haven't the hardware/know-how?