Bug 461

Summary: sudo doesn't ask for password when only the GID is changed
Product: Sudo Reporter: Bdale Garbee <bdale>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: high    
Priority: low    
Version: 1.7.4   
Hardware: PC   
OS: Linux   
Attachments: Fix for checking password when only the group changes

Description Bdale Garbee 2011-01-11 02:56:14 MST
A user of my Debian package of sudo 1.7.4p4 reports that with a sudoers line like

    %sudo ALL=(ALL:ALL) ALL

users of group sudo are correctly prompted for a password when changing user, but are not prompted for a password when changing group.  You can replicate this by seeing the difference in behavior regarding whether a password is prompted for between these two command lines:

    sudo -u root id
    sudo -g staff id

Full details are in http://bugs.debian.org/609641.

I'm stopping short of tagging this a security bug since the exposure is limited to people put in group sudo.
Comment 1 Todd C. Miller 2011-01-11 10:32:56 MST
Created attachment 299 [details]
Fix for checking password when only the group changes

There is a special case in the password checking code that allows a user to run sudo as themselves.  This was not updated when the group support was added.  The attached patch fixes this.
Comment 2 Todd C. Miller 2011-01-15 12:19:46 MST
Fixed in sudo 1.7.4p5