On Tue, Mar 09, 2021 at 02:12:04AM +0000, Nag N via IBM Community wrote:
> Our security team did a test by adding below line to sudoers file .
>
> testuser ALL = NOPASSWD: /usr/bin/vi
>
> when "testuser" runs command "sudo vi <file> " and when user escapes
> to shell from vi by typing :!ksh , it provides root window to test
> user .
That's not a sudo issue, that is vi. Basically you assigned the test
user access as root to an insecure application. The fix? Don't assign
root access to insecure applications to users.
> Is there any solution for this issue. The reason we are upgrading
> to fix vulnerability but it is creating another security issue. Any
> help or suggestion to bypass this problem is appreciated.
You're upgrading Sudo to fix a problem with the Sudo binary. The
solution is to not assign vi to users. This vi issue is always
present, it was not introduced by the upgrade.
> Another issue, after the upgrade, the new suderos file had entry
> @includedir /etc/sudoers.d before upgrade it was #includedir
> /etc/sudoers.d . The # sign is changed to@ ..This is not serious
> issue, I can change back to # sign, but it is the upgraded version
> uses #includedir /etc/sudoers.d
Always backup your configuration files.
------------------------------------------------------------------
Russell Adams
Russell.Adams@AdamsSystems.nlPrincipal Consultant Adams Systems Consultancy
http://adamssystems.nl/
Original Message:
Sent: 3/8/2021 9:12:00 PM
From: Nag N
Subject: Security hole after upgrading to "sudo_noldap-1.9.5p2-1.ppc"
Our security team did a test by adding below line to sudoers file .
testuser ALL = NOPASSWD: /usr/bin/vi
when "testuser" runs command "sudo vi <file> " and when user escapes to shell from vi by typing :!ksh , it provides root window to test user .
Is there any solution for this issue. The reason we are upgrading to fix vulnerability but it is creating another security issue. Any help or suggestion to bypass this problem is appreciated.
Another issue, after the upgrade, the new suderos file had entry @includedir /etc/sudoers.d before upgrade it was #includedir /etc/sudoers.d . The # sign is changed to@ ..This is not serious issue, I can change back to # sign, but it is the upgraded version uses
#includedir /etc/sudoers.d
Thanks
------------------------------
Nag N
------------------------------
</file>