]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
sudo: add upstream security patch for CVE-2017-1000367
authorPeter Korsgaard <peter@korsgaard.com>
Wed, 31 May 2017 06:47:18 +0000 (08:47 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Thu, 1 Jun 2017 14:42:25 +0000 (16:42 +0200)
commite67d4c0c3f554d1a7f9e622bfb971886ac0935a5
tree37cad15f4f6e80e14ca62c5eddd61d1f0bbd9a80
parente73a40c41c79c44e7bf29b021d4feb6905bbd991
sudo: add upstream security patch for CVE-2017-1000367

CVE-2017-1000367 - Potential overwrite of arbitrary files on Linux

On Linux systems, sudo parses the /proc/[pid]/stat file to determine the
device number of the process's tty (field 7).  The fields in the file are
space-delimited, but it is possible for the command name (field 2) to
include spaces, which sudo does not account for.  A user with sudo
privileges can cause sudo to use a device number of the user's choosing by
creating a symbolic link from the sudo binary to a name that contains a
space, followed by a number.

If SELinux is enabled on the system and sudo was built with SELinux support,
a user with sudo privileges may be able to to overwrite an arbitrary file.
This can be escalated to full root access by rewriting a trusted file such
as /etc/shadow or even /etc/sudoers.

For more details, see: https://www.sudo.ws/alerts/linux_tty.html

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit fddb760946a4f4ca366528a673989793be65a678)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/sudo/0001-fix-CVE-2017-1000367.patch [new file with mode: 0644]