[sudo-users] Debugging a sudo segmentation fault

Jeff Makey jeff at sdsc.edu
Fri Oct 30 18:18:44 EDT 2009


With my own compiled version of sudo-1.7.2p1 on a 64-bit Red Hat
Enterprise Linux 4 system, I get a segmentation fault following the
second attempt to enter my password:

 % sudo -K
 % sudo id
 Password for jeff/sudo at SDSC.EDU: [incorrect password]
 Sorry, try again.
 Password for jeff/sudo at SDSC.EDU: [any password]
 Segmentation fault

This does not happen on 32-bit systems, and it always works normally
when the password is correct the first time:

 % sudo -K
 % sudo id
 Password for jeff/sudo at SDSC.EDU: [correct password]
 uid=0(root) gid=0(root)

We are using Kerberos 5 authentication with a modification to append
"/sudo" to the principal name.  This allows users to have a different
password for sudo.

My question is: how can I use gdb to debug this?  I can run gdb as
root, but when sudo runs as root (even with SUDO_USER=jeff in the
environment) it does not ask for a password.  Is there an easy way to
hack sudo to make it ask for the user password when run as root?

                          :: Jeff Makey
                             jeff at sdsc.edu



More information about the sudo-users mailing list