CVE Vulnerabilities

CVE-2021-3156

Off-by-one Error

Published: Jan 26, 2021 | Modified: Feb 04, 2024
CVSS 3.x
7.8
HIGH
Source:
NVD
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
7.2 HIGH
AV:L/AC:L/Au:N/C:C/I:C/A:C
RedHat/V2
RedHat/V3
Ubuntu

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.

Weakness

A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

Affected Software

Name Vendor Start Version End Version
Sudo Sudo_project 1.8.2 (including) 1.8.32 (excluding)
Sudo Sudo_project 1.9.0 (including) 1.9.5 (excluding)
Sudo Sudo_project 1.9.5 (including) 1.9.5 (including)
Sudo Sudo_project 1.9.5-patch1 (including) 1.9.5-patch1 (including)

Potential Mitigations

References