| Name | CVE-2021-23240 |
| Description | selinux_edit_copy_tfiles in sudoedit in Sudo before 1.9.5 allows a local unprivileged user to gain file ownership and escalate privileges by replacing a temporary file with a symlink to an arbitrary file target. This affects SELinux RBAC support in permissive mode. Machines without SELinux are not vulnerable. |
| Source | CVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more) |
Vulnerable and fixed packages
The table below lists information on source packages.
| Source Package | Release | Version | Status |
|---|
| sudo (PTS) | bullseye (security), bullseye | 1.9.5p2-3+deb11u1 | fixed |
| bookworm | 1.9.13p3-1+deb12u1 | fixed |
| trixie, sid | 1.9.15p5-3 | fixed |
The information below is based on the following data on fixed versions.
| Package | Type | Release | Fixed Version | Urgency | Origin | Debian Bugs |
|---|
| sudo | source | (unstable) | 1.9.5-1 | unimportant | | |
Notes
https://www.openwall.com/lists/oss-security/2021/01/11/2
https://www.sudo.ws/repos/sudo/rev/8fcb36ef422a
https://www.sudo.ws/alerts/sudoedit_selinux.html
Neutralised by kernel hardening (fs.protected_symlinks = 1)