Red Hat Bugzilla – Bug 6191
su: Segmentation fault
Last modified: 2008-05-01 11:37:52 EDT
Redhat 6.1 standart configuration from CD, (ISO from
PC: Intel Pentium III 450 MHz, 256 RAM, SCSI hard drive, S3
TrioV2 video adapter.
When run as normal user "su" - receive "Segmentation fault"
problem only with certain types telnet programs.
RedHat 5.2, Slackware 4.0 - such problems have not.
I have seen very similar problem but for root user. 'su' command without '-'
(like for example 'su news') ends up with segmentation fault (but I wasn't able
to produce core dump even with unlimited coredumpsize). 'su - news' works
'su' itself from normal user account prompts for password and works fine.
This bug causes segfault from '/etc/cron.daily/slrnpull-expire'.
The problem shows itself when logged on console and from kdm. I haven't tried
remote logins nor gdm.
The problem seems to be related to pam_xauth module and probably should be
solved there. To reproduce a fault you need two things: be logged as root and
have empty DISPLAY variable (so that getenv("DISPLAY") returns empty string,
not NULL). Then try su anybody and thats it.
I suppose the problem lies in pam_xauth.c at line 484 when you try to
free the pointer returned by getenv. I am quite sure you can't do that (but
man page doesn't say a word about it).
pam is pam 0.68-7
firstname.lastname@example.org hit it exactly. This will be fixed in pam-0.72-6 and later in
Raw Hide and future releases.