Red Hat Bugzilla – Bug 1277426
CVE-2015-5602 sudo: Unauthorized privilege escalation in sudoedit
Last modified: 2016-01-19 07:53:31 EST
An unauthorized privilege escalation was found in sudoedit when a user is granted with root access to modify a particular file that could be located in a subset of directories. It seems that sudoedit does not check the full path if a wildcard is used twice (e.g. /home/*/*/file.txt), allowing a malicious user to replace the file.txt real file with a symbolic link to a different location (e.g. /etc/shadow), which results into unauthorized access. Affected versions are <= 1.8.14.
Reproducer can be found here:
Created sudo tracking bugs for this issue:
Affects: fedora-all [bug 1277427]
sudo-1.8.15-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
sudo-1.8.15-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Configurations like the one mentioned in comment #0, where a user has edit or execute privileges for files in a directory writeable by the user, are inherently dangerous.
It's (almost?) impossible to make such scenarios entirely secure and controllable. Even with the upstream patch, which disables following symlinks by default, there is no full protection.
I can only recommend to migrate to a more secure configuration.
Upstream bug report for this issue:
It notes that the fix in 1.8.15 does not completely address the issue. Following additional changes were applied post 1.8.16:
And also related: