Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658010 - app-admin/sudo segfaults with sys-libs/glibc-2.26-r7
Summary: app-admin/sudo segfaults with sys-libs/glibc-2.26-r7
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-12 21:55 UTC by Daniel Morlock
Modified: 2018-06-12 22:02 UTC (History)
0 users

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


Attachments
output for emerge sudo (sudo-build.log,157.24 KB, text/x-log)
2018-06-12 21:59 UTC, Daniel Morlock
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Morlock 2018-06-12 21:55:43 UTC
Running sudo (tested 1.8.20_p2, 1.8.22-r2 and 1.8.23) results in a segfault: 

$ gdb /usr/bin/sudo
$ (gdb) r
Starting program: /usr/bin/sudo 

Program received signal SIGSEGV, Segmentation fault.
0x00005594f5d70bd8 in get_user_info (ud=0x5594f5f7eb20 <user_details>) at ./sudo.c:541
541	    ud->sid = getsid(0);
(gdb)

I've re-compiled gcc (6.4), glibc and binutils without success.

Reproducible: Always

Steps to Reproduce:
1. Emerge sys-libs/glibc-2.26-r7
2. Re-emerge sudo
3. Run sudo
Actual Results:  
$ sudo
zsh: segmentation fault (core dumped)  sudo


$ emerge --info
fatal: Not a git repository (or any of the parent directories): .git
Portage 2.3.40 (python 3.5.5-final-0, default/linux/amd64/17.0/systemd, gcc-6.4.0, glibc-2.26-r7, 4.15.18-gentoo x86_64)
=================================================================
System uname: Linux-4.15.18-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.4.1
KiB Mem:    32844388 total,  21056164 free
KiB Swap:   33619964 total,  33619964 free
Timestamp of repository gentoo: Tue, 12 Jun 2018 21:00:01 +0000
Head commit of repository gentoo: ad254d79b82f400acb7d58433209531bf3ba47c5
Head commit of repository arh: 3193edcb9286f1ddc05892727e5ec04515138db8

sh bash 4.4_p12
ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
ccache version 3.3.4 [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.5-r1::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/ccache:          3.3.4-r1::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.8::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.12.6-r1::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.28.1::gentoo, 2.29.1-r1::gentoo, 2.30-r2::gentoo
sys-devel/gcc:            5.4.0-r4::gentoo, 6.4.0-r1::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

arh
    location: /home/daniel/workspace/overlays/arh
    sync-type: git
    sync-uri: https://gitlab.awesome-it.de/overlays/arh.git
    masters: gentoo

local
    location: /home/daniel/workspace/overlays/local
    sync-type: git
    sync-uri: https://gitlab.awesome-it.de/daniel.morlock/overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=broadwell -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=broadwell -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=9 --load-average=8"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ rsync://mirror.eu.oneandone.net/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl acpi aes alsa amd64 avx avx2 berkdb bluetooth bzip2 cli crypt cryptsetup cups cxx dbus dri fma3 fortran gdbm glamor gtk gtk2 gtk3 hidpi iconv icu ipv6 jpeg jpeg2k libtirpc mmx mmxext modules multilib ncurses nls nptl openmp pam pcre popcnt pulseaudio readline seccomp sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 systemd tcpd udev unicode xattr xft zlib zsh-completion" ABI_X86="64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="synaptics evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0 php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Daniel Morlock 2018-06-12 21:59:14 UTC
Noted that I get these warnings while compiling: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]

Since I don't get these warning on a Gentoo with sys-libs/glibc-2.25-r11 I don't think that this is an upstream issue as suggested here:

1412  * QA Notice: Package triggers severe warnings which indicate that it
1413  *            may exhibit random runtime failures.
1414  * ./gidlist.c:62:9: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1415  * ./sudo_debug.c:153:24: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1416  * ./sudo_conf.c:319:12: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1417  * ./event_poll.c:51:18: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1418  * ./editor.c:81:13: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1419  * ./env.c:229:13: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1420  * ./group_plugin.c:132:13: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1421  * ./sudoers.c:260:12: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1422  * ./pwutil_impl.c:255:13: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1423  * editor.c:81:13: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1424  * ./visudo.c:308:14: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1425  * ./sudoreplay.c:1591:17: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1426  * group_plugin.c:132:13: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1427  * toke.l:799:13: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1428  * ./env_hooks.c:108:16: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1429  * ./exec_common.c:105:17: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1430  * ./parse_args.c:175:8: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1431  * ./sudo.c:387:15: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]
1432  * ./sudo_edit.c:1000:13: warning: implicit declaration of function 'reallocarray' [-Wimplicit-function-declaration]


Please find attached the complete emerge log.
Comment 2 Daniel Morlock 2018-06-12 21:59:43 UTC
Created attachment 535754 [details]
output for emerge sudo
Comment 3 Daniel Morlock 2018-06-12 22:02:35 UTC
I just found out that this issue was caused by the distcc feature which was falsely enabled. Sorry for the trouble!