CVE-2021-3156
Description
Sudo 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.
Summary dbcve.org
Sudo before 1.9.5p2 contains an off-by-one error in argument processing that leads to a heap-based buffer overflow. When sudoedit is invoked with the -s flag and a command-line argument ending with a single backslash character, the boundary check is bypassed, allowing an attacker to overwrite adjacent heap memory and gain root privileges.
Mitigation
Upgrade sudo to version 1.9.5p2 or later to patch the off-by-one error. Alternatively, restrict sudo/sudoedit access or monitor for exploitation attempts using the -s flag with backslash-terminated arguments.