Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 62123 - Authen-PAM causes segfaults in webmin
Summary: Authen-PAM causes segfaults in webmin
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Highest critical (vote)
Assignee: Gentoo Perl team
: 78964 84928 86958 (view as bug list)
Depends on:
Reported: 2004-08-29 10:38 UTC by Gary
Modified: 2006-07-08 09:02 UTC (History)
11 users (show)

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

Output of "strace /etc/init.d/webmin start 2> filename.txt" (init_d_webmin-start-strace.txt,181.07 KB, text/plain)
2005-08-16 09:05 UTC, FieldySnuts

Note You need to log in before you can comment on or make changes to this bug.
Description Gary 2004-08-29 10:38:12 UTC
aragorn father # /etc/init.d/webmin start
 * Starting Webmin...
/etc/init.d/webmin: line 21: 26775 Segmentation fault      start-stop-daemon --start --quiet --exec /usr/libexec/webmin/ /etc/webmin/miniserv  [ !! ]

Reproducible: Always
Steps to Reproduce:
1.Emerge libperl perl
3./etc/init.d/webmin start

Actual Results:  
webmin segfaults as shown above.

Expected Results:  
Webmin init script should have started webmin miniserver

I re-emerged webmin after perl upgrade. Still no success.

Kerenel 2-6-7-gentoo-r11
GCC 3.3.4-r1
Comment 1 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-01 13:01:48 UTC
what version of pperl did you have before?

Please provide the output of 'emerge info'
Comment 2 Gary 2004-09-01 14:20:29 UTC
Previous version of perl was dev-lang/perl-5.8.4-r1

Portage 2.0.50-r10 (default-x86-1.4, gcc-3.3.4, glibc-, 2.6.7-gentoo-r11)
System uname: 2.6.7-gentoo-r11 i686 Pentium III (Coppermine)
Gentoo Base System version 1.5.2
distcc 2.17 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer"
FEATURES="autoaddcvs ccache distcc sandbox"
USE="X alsa apm avi berkdb bonobo crypt cups dga encode esd evo f2c fbcon foomaticdb gb gd gdbm gif gnome gpm gtk gtk2 gtkhtml guile imlib java jpeg lcms libgda libwww mad maildir mbox mmx motif mozilla mpeg nas ncurses nls oggvorbis opengl oss pam pcmcia pdflib perl pic plotutils png pnp python quicktime readline ruby sasl sdl slang slp snmp spell sse ssl svga tcltk tcpd tetex threads tiff truetype trusted usb wmf x86 xface xml xml2 xmms xv zlib"
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-06 01:45:35 UTC
did you re-emerge your perl modules since updating perl?
Comment 4 Gary 2004-09-06 06:03:34 UTC
I thought that /usr/portage/dev-lang/perl/files/libperl_rebuilder would re-emerge the modules.  It certainly seemed like it emerged a lot of mods.  Is there a resonably easy way to re-emerge all of the perl stuff?
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-06 09:34:32 UTC
oh it does... sorry I missed that when I was re-reading it...  I can't reproduce it... can you please try getting me a backtrace?
Comment 6 Gary 2004-09-06 10:58:29 UTC

I hate to sound lame, but how do I generate the backtrace?
Comment 7 Roberto Teichmann 2004-09-11 02:48:56 UTC
I can confirm this bug.

However an update of perl didn't cause the problem in my case. Here webmin segfaulted ever since I installed usermin, which in turn led to the installation of dev-perl/Authen-PAM-0.14 as a dependency.

It seems like this (updated) perl module caused the problem. After an 'emerge -C Authen-PAM', the webmin miniserver works again as expected.

(perl 5.8.4, webmin 1.160)
Comment 8 Gary 2004-09-11 15:57:56 UTC
Roberto is correct.  The problem appears to be the Authen-PAM module.  When I removed (emerge -C Authen-PAM) as per Roberto's suggestion Webmin starts properly.

Roberto, will you open a bug report for Authen-PAM?
Comment 9 Michael Cummings (RETIRED) gentoo-dev 2004-09-23 05:18:28 UTC
Seems the webmin ebuilds don't even depend on Authen::PAM or Authen::Libwrap (which isn't in portage) - but the package does....

Can someone please post the exact error message that miniserv is reporting relevant to Authen::PAM? Not the init error (which vaguely says it failed it to start), but the actual message. Thanks!
Comment 10 Michael Cummings (RETIRED) gentoo-dev 2004-09-23 05:41:38 UTC
Got it. It's an incompaitbility between Authen::PAM and the current stable PAM (when this module was added to the tree, the PAM of the time worked fine with it). Looking...
Comment 11 Jeremy Huddleston (RETIRED) gentoo-dev 2004-09-23 14:27:54 UTC
AFAIK, webmin doesn't require pam, but if it is present, it makes use of it... once this bug gets settled, I'll use the pam USE flag to optionally pull in this perl module...
Comment 12 Michael Cummings (RETIRED) gentoo-dev 2004-09-24 07:59:01 UTC
I'm having problems locking down the cause for this...

I have three boxes to look at. 2 are perl 5.8.4, one is perl 5.8.5, all have pam-0.77. 2 of the boxes - 1 5.8.4 and the 5.8.5 - are throwing the same error. The third machine - no problems, compiles and runs it without a problem. 
Comment 13 Rumen Yotov 2004-09-29 21:15:56 UTC
Have a all ~x86 system, hardened-kernel-2.6.7-r8, quite full PaX&grsec2.
Also have this bug. But in my case there are PaX logs in dmesg.
They too confirm that the culpit is
1.This is output from #paxctl -v /lib/
PaX control v0.2
Copyright 2004 PaX Team <>

- PaX flags: -------x-e-- [/lib/]
        RANDEXEC is disabled
        EMUTRAMP is disabled
shows that pam is compiled PaX-protected - OK.
2.Output (PaX) from dmesg:
PAX: execution attempt in: /lib/, 23b58000-23b60000 00000000
PAX: terminating task: /usr/bin/perl5.8.5(, uid/euid: 0/0, PC: 23b59969, SP: 5b62feb0
PAX: bytes at PC: 80 7d 00 00 89 e8 0f 84 fe fe ff ff c6 00 00 40 80 38 00 75 
PAX: bytes at SP: 2399b970 00000010 2399b960 23999fd8 23999fd8 2399b960 2399b2a4 00000000 fb6af317 00000005 00000000 154bbbe3 15612c4c 00000000 00000005 23b606d0 2399b2a4 00000000 2399b2a4 23b5cb20 
grsec: attempted resource overstep by requesting 4096 for RLIMIT_CORE against limit 0 by /usr/libexec/webmin/[] uid/euid:0/0 gid/egid:0/0, parent /sbin/[] uid/euid:0/0 gid/egid:0/0
Don't know much about webmin but think it's a bunch of perl scripts to handle linux administration so there can't be a PaX problem with them but with some binary.
So the culpit is Authen-PAM-(0.14 in my case).
Unmerged it webmin starts.
But this log leads me to think that thare are something which causes this previously mentioned segmentation errors - logged above.
As there is a solution already pls ignore if this info is not usefull.
Comment 14 Michael Cummings (RETIRED) gentoo-dev 2004-09-30 06:36:37 UTC
Actually the info is handy. There is a problem with authen-pam (on some boxes, randomly not on others) and pam-0.77. I'm not having any luck figuring out what specifically, so any info is helpful :)
Comment 15 Keith Landry 2004-10-03 22:17:07 UTC
I have the same situation with two out of three systems exhibiting this behaviour.

After doing a emerge -e world on a system which was exhibitng the behaviour, it is now sptiitng the followng message into my /var/log/messages when webmin fails art boot:

Oct  4 00:35:30 wintermute perl: PAM application failed to re-exec stack [76092486:1]

The Oracle of Google shows the error may be coming from:

Portage 2.0.51_rc7 (default-x86-2004.0, gcc-3.4.2, glibc-, 2.6.8-gentoo-r6 i686)
System uname: 2.6.8-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 3.06GHz
Gentoo Base System version 1.5.3
distcc 2.17 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-
Headers:  media-tv/ivtv-0.1.9-r4
Libtools: sys-devel/libtool-1.5.2-r5
CFLAGS="-O3 -mfpmath=sse,387 -march=pentium4 -fstack-protector-all -ffast-math -fomit-frame-pointer -pipe"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control /var/www/localhost/htdocs//mythweb/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -mfpmath=sse,387 -march=pentium4 -fstack-protector-all -ffast-math -fomit-frame-pointer -pipe"
FEATURES="autoaddcvs ccache distcc distlocks prelink"
USE="X acl acpi aim alsa apm arts avi berkdb bitmap-fonts bonobo cdr crypt cups curl curlwrappers dba divx4linux doc dvd encode esd ethereal flac foomaticdb ftp gd gdbm gif gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile iconv icq imlib ipv6 ithreads jabber java joystick jpeg kde libg++ libwww lirc mad mikmod mmx motif mozilla mpeg mysql ncurses nls nptl odbc offensive oggvorbis opengl oscar oss pam pcmcia pcre pdflib perl png pnp posix python qt quicktime readline ruby samba sdl session sessions slang slp snmp soap spell spl sse sse2 ssl svga sysvipc tcltk tcpd theora threads tidy tiff transcode truetype usb videos x86 xinerama xml2 xmms xosd xprint xv xvid yahoo zlib"

Hope this helps.
Comment 16 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-21 11:30:19 UTC
*** Bug 78964 has been marked as a duplicate of this bug. ***
Comment 17 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-21 11:30:44 UTC
perl guys... any word on this?
Comment 18 Michael Cummings (RETIRED) gentoo-dev 2005-01-24 12:57:51 UTC
I have a bug in with the author and absolutely no response on the matter from him. The problem began during the updates to pam in late november, but I'm not conversant enough in Pam to be able to identify where the problem is. I believe its related to a similar "bug" (security fix) where you can't execute a login from a command shell (sounds weird, I know, but the failure in authen-pam is that it can't link or execute authentication on tty's). I'm willing to -arch it for now if the usermin folks are agreeable (only ebuild outside of dev-perl to dep it).
Comment 19 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-24 14:07:23 UTC
Michael, go ahead and throw it into package.mask or -arch.  It isn't required for all of usermin, just a couple modules.  Would you like me to put pressure upstream?  And maybe the pam herd knows something that can help here...
Comment 20 Michael Cummings (RETIRED) gentoo-dev 2005-01-24 16:06:51 UTC
If you can sway upstream, I am indebted. He's got a horrible rating on rt (cpan) (official perl qa site) - most people can't get Authen::Pam to compile against current pam libraries. I even poked at other distros - and they are all using a horridly ancient copy (not an option - years and year and years old, minus security fixes...then again, at least it worked...). I'd rather -arch it for now - too easy to forget that it's in package.mask for me :)
Comment 21 Michael Cummings (RETIRED) gentoo-dev 2005-01-27 04:09:59 UTC
For what it's worth, I have a test bed now. My box at work, which was based on an image made in December, can use Authen-PAM without any problem, whereas my boxes at home cannot. I'm attempting to track down the differences now (any input welcome), on the surface at least the only diff is that at work this is a generic 2.6.6 kernel vs gentoo-2.6.8 at home
Comment 22 Ryan Egesdahl 2005-02-10 21:42:42 UTC
Okay, I had the same problem here because I thought I needed to install Authen::PAM. I was wrong. You don't need it. Just unmerge Authen::PAM and stop Webmin. Delete the certificate from your browser's cache, reemerge Webmin, and pray. Then run etc-update and accept the changes (it should recalculate the certificate and make a modification to an mtime line in its config file). When you try to log in again, you should have success. Make sure you log in from first, as that is exactly what I did. It should make no difference, but if someone else can overcome the problem in the same manner there's a basis for comparison. Good luck to you! ;-)
Comment 23 Jeremy Huddleston (RETIRED) gentoo-dev 2005-03-13 10:56:15 UTC
*** Bug 84928 has been marked as a duplicate of this bug. ***
Comment 24 Jeremy Huddleston (RETIRED) gentoo-dev 2005-03-13 10:57:32 UTC
Michael, any progress here?
Comment 25 Jeremy Huddleston (RETIRED) gentoo-dev 2005-03-29 00:41:39 UTC
*** Bug 86958 has been marked as a duplicate of this bug. ***
Comment 26 Jeremy Huddleston (RETIRED) gentoo-dev 2005-03-29 00:42:04 UTC
Michael, any progress here?
Comment 27 Michael Cummings (RETIRED) gentoo-dev 2005-04-30 06:10:07 UTC
No, I still have sporadic results, and I truly believe these are related to changes in PAM - attempting to execute a regular login (at prompt, type login) works fine on the box that Authen::PAM works and tests well on, segfaults and crashes on the box that Authen::PAM can't test on.
Comment 28 FieldySnuts 2005-08-16 09:04:04 UTC
Yikes, this bug is almost a year old.

I am having the same problem with webmin 1.210. 1.200 worked fine.

Merging Authen-PAM-0.14 myself (the ebuild should depend on this, I reckon?)
stopped the error in /var/log/webmin/miniserv.error, and now it says this upon

 [16/Aug/2005:11:52:56 -0400] started
 [16/Aug/2005:11:52:56 -0400] PAM authentication enabled

However, the init script shows [!!], and a netstat / lsof does not reveal
miniserv listening anywhere. There are no errors at all in miniserv.error.

I have pam-0.78-r2 installed, with the following USE flags: +berkdb -nis
-pam_chroot -pam_console -pam_timestamp +pwdb (-selinux)

Yesterday is when I upgraded webmin from 1.200 to 1.2100. It is also when I
upgraded pam-login from 3.17 to .

I will be attaching an strace output for /etc/init.d/webmin start.

Portage (default-linux/x86/2005.0, gcc-3.4.3,
glibc-, i686)
System uname: i686 Pentium III (Katmai)
Gentoo Base System version 1.12.0_pre5
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.2.3-r1, 2.3.4-r1, 2.4.1-r1
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9, 1.8.5-r2, 1.9.6
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.4.19
CFLAGS="-march=pentium3 -mtune=pentium3 -O2 -pipe"
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/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -mtune=pentium3 -O2 -pipe"
FEATURES="autoconfig buildpkg ccache distlocks notitles sandbox sfperms strict"
USE="x86 X apache2 apm avi berkdb bitmap-fonts cdr chroot crypt cscope cups curl
dvdr eds emboss encode esd fam flac foomaticdb fortran gd gdbm gif gnome gpm
gstreamer gtk gtk2 imagemagick imlib java jpeg kde kerberos libg++ libwww mad
mikmod mmx motif mozilla mp3 mpeg mysql ncurses nls ogg oggvorbis opengl oss pam
pdflib perl png python qt quicktime readline samba sdl slang snmp spell sse ssl
svga tcltk tcpd tiff truetype truetype-fonts type1-fonts vorbis xml2 xmms xv
zlib userland_GNU kernel_linux elibc_glibc"

Comment 29 FieldySnuts 2005-08-16 09:05:18 UTC
Created attachment 66084 [details]
Output of "strace /etc/init.d/webmin start 2> filename.txt"
Comment 30 N Addy 2005-08-16 18:15:31 UTC
This bug just appeared for me after I upgraded baselayout from 1.11.13 to
1.12.0_pre5.  Webmin worked fine with the earlier baselayout version.  In my
case I do not have Authen-PAM installed so I do see the following in
/var/log/webmin/miniserv.error each time webmin is started

   [15/Aug/2005:22:20:59 -0500] started
   [15/Aug/2005:22:20:59 -0500] Perl module Authen::PAM needed for PAM is not
installed : Can't locate Authen/ in @INC (@INC contains: /etc/perl... <snip>

but it does not seem to affect startup or functionality.

Immediately after upgrading baselayout to 1.12.0_pre5 webmin stopped loading on
startup with the same behaviour described above by FieldySnuts.  Downgrading
baselayout to 1.11.13 returned webmin to working order.

My current (working) relevant versions are as follows:

 . webmin-1.210
 . baselayout-1.11.13
 . perl-5.8.7
 . pam-0.78-r2

Portage (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1,
2.6.12-gentoo-r8 i686)
System uname: 2.6.12-gentoo-r8 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.13
dev-lang/python:     2.2.3-r5, 2.3.5, 2.4.1-r1
sys-apps/sandbox:    1.2.12
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
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
CFLAGS="-march=i686 -O3 -pipe"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref
/usr/share/config /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-march=i686 -O3 -pipe"
FEATURES="autoconfig distlocks sandbox sfperms strict"
USE="x86 X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups curl eds emacs
emboss encode esd fam foomaticdb fortran gd gdbm gif gnome gphoto2 gpm gstreamer
gtk gtk2 imagemagick imlib ipv6 java jpeg junit libg++ libwww mad mikmod motif
mozilla mp3 mpeg mysql nas ncurses nls odbc ogg oggvorbis opengl oss pam pdflib
perl png postgres python quicktime readline ruby samba sdl session slang spell
ssl svga tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts vorbis xml
xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Comment 31 FieldySnuts 2005-08-16 18:27:49 UTC
Regards to Comment #30 :

Curious, because I just upgraded to that very same version of baselaoyout.
Comment 32 FieldySnuts 2005-08-19 06:07:12 UTC
Bug 102826 seems related to this, and that seems to have been fixed.
Comment 33 FieldySnuts 2005-08-19 09:32:04 UTC
Then again, maybe not. I still have the issue.
Comment 34 Jakub Moc (RETIRED) gentoo-dev 2005-09-04 04:12:30 UTC
Mass re-assign.
Comment 35 N Addy 2005-09-13 17:47:17 UTC
Where is this bug going?  Over a year old and its not even assigned yet. 
Looking back at the history I'm not even certain it is the same root cause.  

All I know is that I can't take an upgrade to baselayout any longer without
losing Webmin functionality.  Obviously, this is backing up upgrades for other
packages that depend on the newer baselayout.
Comment 36 David Grant 2005-09-14 07:03:46 UTC
Comment 37 Jakub Moc (RETIRED) gentoo-dev 2005-11-09 09:11:01 UTC
Mass re-assign.
Comment 38 Chris White (RETIRED) gentoo-dev 2005-11-09 10:29:54 UTC
I would try the latest 0.16 version I just put in portage.  mcummings was 
telling me last night that some of the tests failed in 0.15, but don't fail for 
me in 0.16.  That said, give it a spin. 
Comment 39 Tupone Alfredo gentoo-dev 2006-01-07 14:48:22 UTC
Works for me
Comment 40 Michael Cummings (RETIRED) gentoo-dev 2006-01-11 09:13:45 UTC
Looks like Authen-PAM 0.16 is more PAM friendly again. Can anyone confirm that this is also resolves this bug?
Comment 41 Michael Cummings (RETIRED) gentoo-dev 2006-01-15 06:57:16 UTC
Closing. You know what to do if the new authen-pam ebuilds don't work for you :)
Comment 42 Michael Cummings (RETIRED) gentoo-dev 2006-04-18 14:07:36 UTC
eradicator - can we get this dep added back now? PAM and Authen-PAM play nice again.
Comment 43 Michael Cummings (RETIRED) gentoo-dev 2006-07-08 09:02:20 UTC
closing - this is resolved now