Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 266361 - app-admin/sudo-1.7.1: crash in setenv() with pam_mount-1.22
Summary: app-admin/sudo-1.7.1: crash in setenv() with pam_mount-1.22
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL: http://www.gratisoft.us/bugzilla/show...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-16 12:09 UTC by helge preuss
Modified: 2009-04-24 15:22 UTC (History)
0 users

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


Attachments
Backtrace of sudo failing in setenv() (sudo-backtrace.log,1.14 KB, text/plain)
2009-04-24 14:06 UTC, Brett Edgar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description helge preuss 2009-04-16 12:09:31 UTC
The symptoms are the same as in Bug 249250. Only this time the fault appears not to be with (any specific version of) pam_mount, because I get segfaults with any recent version of pam_mount (1.20, 1.21 and 1.22) while a downgrade to app-admin/sudo-1.7.0 helps.

emerge --info:


Portage 2.1.6.11 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.28-gentoo-r2-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-2.0.0
Timestamp of tree: Wed, 15 Apr 2009 12:00:05 +0000
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p17-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2, 2.6.1-r1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.3-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
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.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.2/env /usr/kde/4.2/share/config /usr/kde/4.2/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /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/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-mtune=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
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="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acl acpi alsa amd64 apache2 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus doc dri dvd dvdr dvdread eds emboss encode esd evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal htmlhandbook iconv ipv6 isdnlog java jpeg kde kdeprefix ldap libnotify lm_sensors mad midi mikmod mmx mp3 mpeg mudflap multilib mysql ncurses nls nptl nptlonly nvidia offensive ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification subversion svg sysfs tcpd tiff truetype unicode usb vorbis xcomposite xinerama xml xorg xulrunner xv xvmc 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" APACHE2_MPMS="peruser" 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="nvidia nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

And, for what it's worth, the output of: 
strace sudo ls 2> strace.out; tail -n 20 strace.out
lseek(6, 1941, SEEK_SET)                = 1941
munmap(0x7f11d41d0000, 1941)            = 0
close(6)                                = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 6
lseek(6, 0, SEEK_CUR)                   = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=1941, ...}) = 0
mmap(NULL, 1941, PROT_READ, MAP_SHARED, 6, 0) = 0x7f11d41d0000
lseek(6, 1941, SEEK_SET)                = 1941
munmap(0x7f11d41d0000, 1941)            = 0
close(6)                                = 0
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 6
lseek(6, 0, SEEK_CUR)                   = 0
fstat(6, {st_mode=S_IFREG|0644, st_size=1941, ...}) = 0
mmap(NULL, 1941, PROT_READ, MAP_SHARED, 6, 0) = 0x7f11d41d0000
lseek(6, 1941, SEEK_SET)                = 1941
munmap(0x7f11d41d0000, 1941)            = 0
close(6)                                = 0
rt_sigprocmask(SIG_BLOCK, [PIPE], [PIPE], 8) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-16 23:06:21 UTC
Can you please try to get a backtrace following the instructions at http://www.gentoo.org/proj/en/qa/backtraces.xml ?

Thanks.
Comment 2 Robin Bankhead 2009-04-20 10:15:51 UTC
I've also found this problem after installing pam_mount-1.22, using pam-1.0.4 and sudo-1.7.0 and 1.7.1. Will get a backtrace for you as soon as my current emerge world is finished.

I think this is also affecting kdesu-4.2.2, as I call this from a script and it claims the root password is incorrect when I enter it (it's not). Or is this a different issue related to pam_mount? (root is not using pam_mount to do anything, only my user account is.)
Comment 3 Brett Edgar 2009-04-24 14:06:30 UTC
Created attachment 189323 [details]
Backtrace of sudo failing in setenv()

This is a backtrace of sudo-1.7.1 failing in the call to setenv().  This is with pam_mount-1.22 and pam-1.0.4.  sudo-1.7.0 does not fail.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-24 14:36:35 UTC
Okay I found the problem, and reported upstream because I don't know what

setenv(foo, NULL, bar)

should do.
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-24 15:22:08 UTC
Okay this should be fixed in 1.7.1-r1 (and upstream), Todd has been lightning fast :)

Thanks helge for reporting and Brett for the backtrace!