Bug 793 - Commands (not prefixed by "sudo") can acquire root permissions without the user noticing it
Commands (not prefixed by "sudo") can acquire root permissions without the us...
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.8.20
PC Linux
: high security
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-28 03:10 MDT by pnd23
Modified: 2017-08-26 08:13 MDT (History)
2 users (show)

See Also:


Attachments
Open root terminals from file managers started as a non-root user (1.24 KB, application/x-xz)
2017-07-28 03:10 MDT, pnd23
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pnd23 2017-07-28 03:10:13 MDT
Created attachment 498 [details]
Open root terminals from file managers started as a non-root user

Processes that have been started in a terminal session
in which sudo has been used (before or after these processes' startup),
or dependent processes from such processes,
can be used to create processes with root permissions without the user noticing it. (see attachment)
Comment 1 Todd C. Miller 2017-08-01 16:16:55 MDT
This sounds like it is the same as what is described in https://www.sudo.ws/pipermail/sudo-workers/2017-July/001108.html

Sudo commands run in the same terminal session share a common time stamp record.  In sudo 1.8.21 it will be possible to use the parent process ID to restrict the time stamp to commands run by the same process, usually the shell.

Also see: https://www.sudo.ws/repos/sudo/rev/426161a2e06f
Comment 2 Todd C. Miller 2017-08-24 05:52:37 MDT
In sudo 1.8.21 you can use the following in your sudoers file:

Defaults timestamp_type=ppid

to change the time stamp records from per-tty to per-parent-process.  That should address your issue.

This may become the default in a future sudo release.
Comment 3 Elan Ruusamäe 2017-08-26 02:33:53 MDT
this looks backward breaking change,

or i can still disable tty tickets using old syntax? --

    !tty_tickets
Comment 4 Todd C. Miller 2017-08-26 08:13:41 MDT
The old syntax is still supported.