Univention Bugzilla – Bug 40364
sudo: multiple issues (4.1)
Last modified: 2016-10-05 12:46:48 CEST
CVE-2015-5602: sudoedit in Sudo before 1.8.15 allows local users to gain privileges via a symlink attack on a file whose full path is defined using multiple wildcards in /etc/sudoers, as demonstrated by "/home/*/*/file.txt."
Upstream Debian package version 1.8.5p2-1+nmu3+deb7u1 fixes this issue.
The patches have been extracted from the Debian package update and the package has been rebuilt with them in errata4.1-1. Advisory: sudo.yaml
OK: advisory OK: manual test of exploit: root@Test35:~# dpkg -l sudo ii sudo 1.8.5p2-1+nmu2.39. root@Test35:~# visudo >> test01 ALL=(root) NOPASSWD: sudoedit /home/*/*/test.txt root@Test35:~# su - test01 test01@Test35:~$ mkdir testdir test01@Test35:~$ ln -s /etc/shadow testdir/test.txt test01@Test35:~$ sudoedit /home/test01/testdir/test.txt [can edit shadow file] sudoedit: /home/test01/testdir/test.txt unchanged root@Test35:~# DEBIAN_FRONTEND=noninteractive apt-get install sudo sudo (1.8.5p2-1+nmu2.42.201602292006) wird eingerichtet ... test01@Test35:~$ sudoedit /home/test01/testdir/test.txt sudoedit: /home/test01/testdir/test.txt: editing files in a writable directory is not permitted
<http://errata.software-univention.de/ucs/4.1/125.html>