CVE-2019-18634

NameCVE-2019-18634
DescriptionIn Sudo before 1.8.26, if pwfeedback is enabled in /etc/sudoers, users can trigger a stack-based buffer overflow in the privileged sudo process. (pwfeedback is a default setting in Linux Mint and elementary OS; however, it is NOT the default for upstream and many other packages, and would exist only if enabled by an administrator.) The attacker needs to deliver a long string to the stdin of getln() in tgetpass.c.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-2094-1, DSA-4614-1, ELA-213-1
Debian Bugs950371

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
sudosourcewheezy1.8.5p2-1+nmu3+deb7u6ELA-213-1
sudosourcejessie1.8.10p3-1+deb8u7DLA-2094-1
sudosourcestretch1.8.19p1-2.1+deb9u2DSA-4614-1
sudosourcebuster1.8.27-1+deb10u2
sudosource(unstable)1.8.31-1950371

Notes

https://www.sudo.ws/alerts/pwfeedback.html
https://www.openwall.com/lists/oss-security/2020/01/30/6
https://github.com/sudo-project/sudo/commit/fa8ffeb17523494f0e8bb49a25e53635f4509078 (master)
https://github.com/sudo-project/sudo/commit/b5d2010b6514ff45693509273bb07df3abb0bf0a (SUDO_1_8_31)
The issue itself is fixed only in 1.8.31 but a change in the EOF handling
introduced in 1.8.26 mitigated exploitation of the bug in some cases:
https://www.openwall.com/lists/oss-security/2020/01/31/1
Change for "Print a warning for password read issues" in 1.8.26:
https://github.com/sudo-project/sudo/commit/ab2cba0f5d8b286e8e52c06076efd32434f538ae (SUDO_1_8_26)
The overflow is tough as well reachable when using a pty:
https://www.openwall.com/lists/oss-security/2020/02/05/2

Search for package or bug name: Reporting problems