Sudo 'Baron Samedit' heap overflow (CVE-2021-3156)
A shell-mode argument-unescaping loop skips its string-terminator check, so an argument ending in a lone backslash makes sudo read past the end of the string and copy adjacent heap into a fixed buffer, a heap overflow that yields local root.
- Product
- Sudo (sudoers plugin)
- Vendor
- Sudo project (Todd C. Miller)
- Affected
- 1.8.2 through 1.8.31p2, and 1.9.0 through 1.9.5p1
- Fixed in
- 1.9.5p2
- Weakness
- CWE-193
- CVSS vector
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Published
- 26 Jan 2021
Classified as
References
Related CVEs
- CVE-2025-33073high 8.82025
Windows SMB marshalled-target reflection
An SMB target name can hide marshalled metadata that LSASS later strips, turning an attacker-routed hostname into a local target identity and reviving same-host authentication reflection when SMB signing is not enforced.
- CVE-2024-38077critical 9.82024
MadLicense: base-24 license-key heap overflow
The licensing RPC decoder allocates 21 bytes for an expected 35-character base-24 value but converts a null-terminated, attacker-controlled string of unbounded length into that buffer.
- CVE-2024-6387high 8.12024
OpenSSH regreSSHion: unsafe logging in a signal handler
A connection-timeout alarm handler calls a logging path that is not async-signal-safe, so firing it while the main thread is mid-allocation races and corrupts the heap.
- CVE-2024-2961high 8.82024
glibc iconv ISO-2022-CN-EXT out-of-bounds write
Converting to a multibyte charset, one escape-sequence path skips its output-bounds check, writing up to 3 fixed bytes past the buffer.