Comment 21 for bug 234727

Revision history for this message
Andy Brody (abrody) wrote :

I can reproduce this bug with sudo 1.6.9p10-1ubuntu3.8 and a user whose home directory does not exist. It appears to happen only when sudo does not prompt for a password. It happens on several servers with similar configuration, but not on another 8.04.4 server that doesn't use ldap.

abrody@cato:~$ getent passwd nobody
nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
abrody@cato:~$ ls /nonexistent
ls: cannot access /nonexistent: No such file or directory
abrody@cato:~$ sudo -u nobody true
[sudo] password for abrody:
Creating directory '/nonexistent'.
Creating directory '/nonexistent/web'.
abrody@cato:~$ sudo rm -r /nonexistent/
abrody@cato:~$ sudo -u nobody true
Segmentation fault
abrody@cato:~$

# ltrace sudo -u nobody true
[snip]
free(0x629380) = <void>
umask(022) = 022
pam_start(0x41970a, 0x6221d0, 0x61eae0, 0x61eaf8, 0x629380) = 0
pam_set_item(0x629380, 3, 0x621f20, 1, 0x629850) = 0
pam_set_item(0x629380, 2, 0x6221d0, 0, 0xfefefefefefefeff) = 0
pam_set_item(0x629380, 8, 0x629340, 49, 0x6246c0) = 0
pam_set_item(0x629380, 4, 0x621ee0, 0, 0xfefefefefefefeff) = 0
pam_setcred(0x629380, 2, 0x6295f6, 0, 0xfefefefefefefeff) = 0
pam_open_session(0x629380, 0, 0xfffffffe, 0, 1 <unfinished ...>
malloc(16) = 0x6298c0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++