CVE-2021-3156

NameCVE-2021-3156
DescriptionSudo before 1.9.5p2 contains an off-by-one error that can result in a heap-based buffer overflow, which allows privilege escalation to root via "sudoedit -s" and a command-line argument that ends with a single backslash character.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-2534-1, DSA-4839-1, ELA-351-1

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
sudo (PTS)jessie, jessie (lts)1.8.10p3-1+deb8u9fixed
stretch (security)1.8.19p1-2.1+deb9u3fixed
stretch (lts), stretch1.8.19p1-2.1+deb9u6fixed
buster (security), buster, buster (lts)1.8.27-1+deb10u6fixed
bullseye (security), bullseye1.9.5p2-3+deb11u1fixed
bookworm1.9.13p3-1+deb12u1fixed
sid, trixie1.9.16p1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
sudosourcejessie1.8.10p3-1+deb8u8ELA-351-1
sudosourcestretch1.8.19p1-2.1+deb9u3DLA-2534-1
sudosourcebuster1.8.27-1+deb10u3DSA-4839-1
sudosource(unstable)1.9.5p1-1.1

Notes

https://www.sudo.ws/alerts/unescape_overflow.html
https://www.sudo.ws/repos/sudo/rev/9b97f1787804
https://www.sudo.ws/repos/sudo/rev/a97dc92eae6b
https://www.sudo.ws/repos/sudo/rev/049ad90590be
https://www.sudo.ws/repos/sudo/rev/09f98816fc89
https://www.sudo.ws/repos/sudo/rev/c125fbe68783
https://www.openwall.com/lists/oss-security/2021/01/26/3

Search for package or bug name: Reporting problems