Bug 397 - paths in config that end in *.* let any command be run
paths in config that end in *.* let any command be run
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.6.9
PC Linux
: normal high
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-08 16:36 MST by Chris
Modified: 2010-03-09 12:41 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris 2010-03-08 16:36:24 MST
I was trying to figure out why our tech support couldn't run some commands from an /app/bin/ directory.  When I tried an experiment with /app/bin/*.*, I found that I could then run any command that I wanted.

[~]# sudo /sbin/iptables
...
sudo: ldap sudoHost 'ALL' ... MATCH!
sudo: ldap sudoCommand '/bin/zcat' ... not
sudo: ldap sudoCommand '/usr/local/bin/gem' ... not
sudo: ldap sudoCommand '/usr/bin/tail' ... not
sudo: ldap sudoCommand '/bin/ls' ... not
sudo: ldap sudoCommand '/bin/grep' ... not
sudo: ldap sudoCommand '/bin/cat' ... not
sudo: ldap sudoCommand '/usr/bin/pear' ... not
sudo: ldap sudoCommand '/usr/local/bin/pear' ... not
sudo: ldap sudoCommand '/usr/local/php5/bin/pear' ... not
sudo: ldap sudoCommand '/usr/bin/gem' ... not
sudo: ldap sudoCommand '/usr/bin/nano' ... not
sudo: ldap sudoCommand '/usr/bin/rvim' ... not
sudo: ldap sudoCommand '/usr/sbin/exim' ... not
sudo: ldap sudoCommand '/usr/sbin/exiwhat' ... not
sudo: ldap sudoCommand '/usr/sbin/pam_abl' ... not
sudo: ldap sudoCommand '/app/bin/*' ... not
sudo: ldap sudoCommand '/app/bin/*.*' ... MATCH!
sudo: ldap sudoRunAs 'root' ... MATCH!
sudo: Perfect Matched!
sudo: ldap sudoOption: '!authenticate'
sudo: user_matches=-1
sudo: host_matches=-1
sudo: sudo_ldap_check(0)=0x22
iptables v1.3.5: no command specified
Try `iptables -h' or 'iptables --help' for more information.

This is from a Centos5 box using version 1.6.9p17
Comment 1 Todd C. Miller 2010-03-09 12:12:56 MST
This was fixed in a subsequent release.  I can reproduce the problem with sudo 1.6.9p17 but not with 1.6.9p19 and above.
Comment 2 Chris 2010-03-09 12:41:22 MST
Ah, ok.  Thank you.  I'll file a bug with Redhat then.