[sudo-workers] sudo segfaults when using the -g option

Daniel Kopecek dkopecek at redhat.com
Tue Jan 4 09:07:26 EST 2011


Hello,
 there is a NULL dereference bug in sudo-1.7.4p4 in match.c:178 causing
a segfault when the -g option is used. Steps to reproduce and a
proposed patch are available here:

 https://bugzilla.redhat.com/show_bug.cgi?id=667103

Here is some more info from gdb:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7fe8188 in _runaslist_matches (user_list=0x7ffff8214000, group_list=0x7ffff8214010) at ./match.c:178
178		return(userpw_matches(def_runas_default, runas_pw->pw_name, runas_pw));
(gdb) print sudo_user._runas_pw
$1 = (struct passwd *) 0x0

The command was:

# echo "root ALL = NOPASSWD: ALL" > /etc/sudoers.d/foo
# gdb --args ./sudo -g root true


Dan K.



More information about the sudo-workers mailing list