| Summary: | net-ftp/atftp-0.7 segfaults when entering commands | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Raymond Lewis Rebbeck <dystopianray> |
| Component: | Current packages | Assignee: | Robin Johnson <robbat2> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | AMD64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Patch to fix the above mentioned problem. | ||
|
Description
Raymond Lewis Rebbeck
2005-10-20 04:37:50 UTC
I am having the same problem. Portage 2.0.53 (default-linux/amd64/2005.1, gcc-3.4.4, glibc-2.3.5-r3, 2.6.14-gentoo-r2 x86_64) ================================================================= System uname: 2.6.14-gentoo-r2 x86_64 AMD Athlon(tm) 64 Processor 4000+ Gentoo Base System version 1.12.0_pre11 distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.16 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.20-r1 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe -fno-ident" CHOST="x86_64-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.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=athlon64 -O2 -pipe -fno-ident -fvisibility-inlines-hidden" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv" GENTOO_MIRRORS="ftp://gentoo.chem.wisc.edu/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.seren.com/gentoo http://gentoo.cites.uiuc.edu/pub/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="amd64 3dnowex X acpi aim alsa apm arts audiofile avi bash-completion berkdb bitmap-fonts bzip2 cdr crypt curl directfb dvd dvdr dvdread eds emacs emul-linux-x86 encode ethereal expat fam fbcon ftp gdbm gif gmp gpm gstreamer gtk gtk2 icq idn imagemagick imap imlib ipv6 jabber java javascript joystick jpeg kde kdeenablefinal lcms lm_sensors lua lzw lzw-tiff mad mhash mime mmap mng mozilla mp3 mpeg msn ncurses nls nptl nptlonly nvidia ogg openal opengl oscar pam pcre pdflib perl png python qt quicktime readline ruby samba sdl sharedmem simplexml sockets sox speex spell ssl svg szip tcltk theora threads tidy tiff truetype truetype-fonts type1-fonts udev usb userlocales vorbis wifi xine xinerama xml2 xmms xpm xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS I just emerged this packages and saw this bug as well. I couldn't download atftp from the vendors website, so I just took a look in the source code from portage. The problem is in tftp.c in the make_arg function (line 357 for me); the argz_len variable is defined as "int" where it should be "size_t". This problem may not be showing on i386 machines because perhaps "int" and "size_t" are the same on that platform? not sure, but I'm running amd64 and since the argz_create_sep function thinks it's taking a pointer to "size_t", it fills up the whole size of that variable when it sets it, therefore on my system, when it passes an int, it is overwriting 4 bytes on the stack as all zeros which just happens to be the argv pointer in make_arg which is causing a segfault. Anyways, just change the "int" to "size_t" like it should be (gcc warnings warn you of this anyways) and it will fix the problem. Created attachment 75407 [details, diff]
Patch to fix the above mentioned problem.
fixed in cvs (via the debian patch). |