Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274567 - net-analyzer/nagios-plugins: check_ntp_peer segfaults with -DFORTIFY_SOURCE
Summary: net-analyzer/nagios-plugins: check_ntp_peer segfaults with -DFORTIFY_SOURCE
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tobias Scherbaum (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-17 22:39 UTC by Robin Johnson
Modified: 2009-09-16 16:25 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-06-17 22:39:37 UTC
# /usr/lib64/nagios/plugins/check_ntp_peer -H 127.0.0.1
*** buffer overflow detected ***: /usr/lib64/nagios/plugins/check_ntp_peer terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7fb5796febf7]
/lib/libc.so.6[0x7fb5796fc9d0]
/lib/libc.so.6(__read_chk+0x28)[0x7fb5796fcf38]
/usr/lib64/nagios/plugins/check_ntp_peer[0x4024c5]
/usr/lib64/nagios/plugins/check_ntp_peer[0x402f1b]
/lib/libc.so.6(__libc_start_main+0xe6)[0x7fb579634a26]
/usr/lib64/nagios/plugins/check_ntp_peer[0x401469]
======= Memory map: ========

Add -UFORTIFY_SOURCE to the CFLAGS:
# /usr/lib64/nagios/plugins/check_ntp_peer -H 127.0.0.1
NTP OK: Offset 0.103825 secs|offset=0.103825s;60.000000;120.000000;

Portage 2.2_rc33 (!/etc/managed-portage/hosts/beta02/make.profile/, gcc-4.3.3, glibc-2.10.1-r0, 2.6.25.9-b1 x86_64)
=================================================================
System uname: Linux-2.6.25.9-b1-x86_64-Quad-Core_AMD_Opteron-tm-_Processor_2352-with-gentoo-2.0.1
Timestamp of tree: Tue, 16 Jun 2009 02:15:01 +0000
app-shells/bash:     4.0_p24
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-python/pycrypto: 2.0.1-r8
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
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.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.29
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=barcelona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/conf.avail/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=barcelona"
DISTDIR="/home/gentoo/distfiles"
FEATURES="buildpkg collision-protect distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://216.165.129.134/gentoo http://gentoo.mirrors.tds.net/gentoo http://gentoo.osuosl.org/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j10"
PKGDIR="/home/gentoo/packages/webserver-barcelona"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/dev/shm"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://beta01/local-portage"
USE="3dnow 3dnowext amd64 async authdaemond authlib bash-completion berkdb bzip2 bzlib cap caps cdb chroot ck-server cli cracklib crypt curlwrappers dba dbm dbx dio dri erandom exif extensions f2c fam fastcgi flatfile gd-external gdbm gnutls hpn iconv imap innodb ipv6 isdnlog jpeg lids lm_sensors logrotate memlimit midi mmx mpi mudflap multilib mysql mysqli ncurses nethack nfs nls no-htdocs nptl nptlonly offensive openmp pam pcre perl png posix postgres pppd python qmail readline reflection reiserfs romio rrdtool session sftp sftplogging sharedext snmp soap sockets spl sqlite sse sse2 ssl symlink sysfs sysvipc tcpd threads truetype unicode urandom vim-syntax vpopmail xattr xml xmlrpc xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Tobias Scherbaum (RETIRED) gentoo-dev 2009-06-27 10:49:39 UTC
It's fixed in upstream git and will be included in 1.4.14 therefore. I'll take a look at backporting that fix to 1.4.13 in the next days.
Comment 2 Tobias Scherbaum (RETIRED) gentoo-dev 2009-09-16 16:25:21 UTC
1.4.14 released and in CVS.