Bug 1034

Summary: log_subcmds causes issues on AIX
Product: Sudo Reporter: bob.schwartz
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: low    
Version: 1.9.11   
Hardware: IBM   
OS: AIX   

Description bob.schwartz 2022-06-20 12:53:54 MDT
Using 1.9.11p2

with log_subcmds enabled, on AIX running the command "oslevel -s" fails.  

Error on 7.1:
sudo: recv: A connection with a remote socket was reset by that socket.
/usr/bin/oslevel[28]: /usr/bin/sort: 0403-006 Execute permission denied.

"rpm -q sudo" works but takes extremely long to return.  In a session without log_subcmds enabled it functions normally.

Similar messages happen on AIX 7.2

We have not seen similar behavior on Linux
Comment 1 Todd C. Miller 2022-06-20 15:26:13 MDT
I can reproduce this on AIX 7.1.  The recv failures are fixed by https://www.sudo.ws/repos/sudo/rev/8554618665a2 but it is still very slow.  Running "sudo oslevel -s" take close to a minute of real time.
Comment 2 Todd C. Miller 2022-06-20 16:32:59 MDT
Disabling Nagle's algorithm fixed the slowness, https://www.sudo.ws/repos/sudo/rev/11b129850ac1

Before:

-bash-5.0$ /bin/time /opt/sudo/bin/sudo oslevel -s
7100-03-00-0000

Real   50.38
User   1.42
System 2.52

After:

-bash-5.0$ /bin/time /opt/sudo/bin/sudo oslevel -s
7100-03-00-0000

Real   1.93
User   0.47
System 0.52
Comment 3 Todd C. Miller 2022-06-21 10:22:21 MDT
Fixed in sudo 1.9.11p3, out now.