CVE-2021-3156

Published Jan 26, 2021

Last updated a year ago

Exploit knownCVSS high 7.8
Ubuntu
Beyondtrust
Server

Overview

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.
Source
cve@mitre.org
NVD status
Analyzed
Products
sudo, fedora, debian_linux, active_iq_unified_manager, cloud_backup, hci_management_node, oncommand_unified_manager_core_package, ontap_select_deploy_administration_utility, ontap_tools, solidfire, web_gateway, diskstation_manager_unified_controller, diskstation_manager, skynas_firmware, vs960hd_firmware, privilege_management_for_mac, privilege_management_for_unix\/linux, micros_compact_workstation_3_firmware, micros_es400_firmware, micros_kitchen_display_system_firmware, micros_workstation_5a_firmware, micros_workstation_6_firmware, communications_performance_intelligence_center, tekelec_platform_distribution

Risk scores

CVSS 3.1

Type
Primary
Base score
7.8
Impact score
5.9
Exploitability score
1.8
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Severity
HIGH

CVSS 2.0

Type
Primary
Base score
7.2
Impact score
10
Exploitability score
3.9
Vector string
AV:L/AC:L/Au:N/C:C/I:C/A:C

Known exploits

Data from CISA

Vulnerability name
Sudo Heap-Based Buffer Overflow Vulnerability
Exploit added on
Apr 6, 2022
Exploit action due
Apr 27, 2022
Required action
Apply updates per vendor instructions.

Weaknesses

nvd@nist.gov
CWE-193
134c704f-9b21-4f2e-91b3-4a467353bcc0
CWE-193

Social media

Hype score
Not currently trending

Configurations

  1. Issue summary: The DTLS retransmission logic does not correctly handle a handshake message write that is suspended part-way through. The retransmitted message can be read past the message buffer and the retransmission overwrites the internal state the suspended write needs to resume correctly. Impact summary: The retransmitted message can disclose a heap memory to the peer as plaintext handshake data or cause a crash and a Denial of Service when the read reaches an unmapped memory region. CWE: CWE-125: Out-of-bounds Read Description: DTLS handshake messages can be written out in multiple fragments, and a write can suspend mid-message (returning WANT_WRITE) if the underlying transport temporarily cannot accept more data. While such a write is suspended, the DTLS retransmission timer may independently fire and ask the retransmission logic to resend an earlier, already-acknowledged-as-sent message from its retransmit queue. The retransmission logic reused the same internal buffer and position tracking as the message that was still being written, without resetting the position back to the start of the message being retransmitted. As a result the retransmission was read starting from wherever the suspended write had left off, producing a mislabelled message whose body was leftover bytes from the other, larger message still in flight - content that was never meant to be sent at that point, and which could run past the end of the allocated buffer. Separately, even when the retransmission is positioned correctly, allowing it to run to completion while another write is suspended overwrites the same shared bookkeeping that the suspended write depends on to resume. When the application later resumes the suspended write (via a subsequent SSL_read(), SSL_write(), SSL_accept(), or SSL_connect() call), it finds that bookkeeping in a state inconsistent with the message and aborts the process in a debugging build. The fix resets the retransmission's read position to the start of the message before resending, and skips retransmission entirely whenever a handshake write is still suspended, deferring to the next call that resumes it instead. FIPS impact: no The affected code is outside the FIPS module boundary.•CVE-2026-84782

References

Sources include official advisories and independent security research.