Bug 40366

Summary: sudo: multiple issues (3.2)
Product: UCS Reporter: Arvid Requate <requate>
Component: Security updatesAssignee: Arvid Requate <requate>
Status: CLOSED FIXED QA Contact: Daniel Tröder <troeder>
Severity: normal    
Priority: P5 CC: gohmann, walkenhorst
Version: UCS 3.2Flags: requate: Patch_Available+
Target Milestone: UCS 3.2-8-errata   
Hardware: Other   
OS: Linux   
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional): Security
Max CVSS v3 score:
Bug Depends on: 40364, 40365    
Bug Blocks:    

Description Arvid Requate univentionstaff 2016-01-05 11:46:13 CET
+++ This bug was initially created as a clone of Bug #40365 +++

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."
Comment 1 Arvid Requate univentionstaff 2016-01-05 20:49:03 CET
Upstream Debian package version 1.7.4p4-2.squeeze.6 fixes the issue above
Comment 2 Arvid Requate univentionstaff 2016-02-29 20:17:41 CET
The upstream package version has been imported and built in errata3.2-8.

Advisory: sudo.yaml
Comment 3 Daniel Tröder univentionstaff 2016-03-02 13:54:09 CET
OK: advisory
OK: manual test of exploit:

root@ucs32:~# dpkg -l sudo
ii  sudo                        1.7.4p4-2.squeeze.5.38.2015

root@ucs32:~# echo 'test1 ALL=(root) NOPASSWD: sudoedit /home/*/*/test.txt' >> /etc/sudoers
root@ucs32:~# su - test1
test1@ucs32:~$ mkdir testdir
test1@ucs32:~$ ln -s /etc/shadow testdir/test.txt
test1@ucs32:~$ sudoedit /home/test1/testdir/test.txt
sudoedit: /home/test1/testdir/test.txt unchanged

root@ucs32:~# apt-get update
root@ucs32:~# DEBIAN_FRONTEND=noninteractive apt-get install sudo
root@ucs32:~# dpkg -l sudo
ii  sudo                        1.7.4p4-2.squeeze.6.43.2016

root@ucs32:~# su - test1
test1@ucs32:~$ sudoedit /home/test1/testdir/test.txt
sudoedit: /home/test1/testdir/test.txt: editing files in a writable directory is not permitted
Comment 4 Janek Walkenhorst univentionstaff 2016-03-08 18:00:49 CET
<http://errata.software-univention.de/ucs/3.2/409.html>