CVE Vulnerabilities

CVE-2021-28875

Unchecked Return Value

Published: Apr 11, 2021 | Modified: Nov 03, 2022
CVSS 3.x
7.5
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:N/I:N/A:P
RedHat/V2
RedHat/V3
7.5 MODERATE
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Ubuntu
MEDIUM

In the standard library in Rust before 1.50.0, read_to_end() does not validate the return value from Read in an unsafe context. This bug could lead to a buffer overflow.

Weakness

The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.

Affected Software

Name Vendor Start Version End Version
Rust Rust-lang * 1.50.0 (excluding)
Red Hat Developer Tools RedHat rust-toolset-1.52-0:1.52.1-1.el7_9 *
Red Hat Developer Tools RedHat rust-toolset-1.52-rust-0:1.52.1-2.el7_9 *
Red Hat Enterprise Linux 8 RedHat rust-toolset:rhel8-8040020210603202531.2daa1a95 *
Rustc Ubuntu bionic *
Rustc Ubuntu esm-apps/xenial *
Rustc Ubuntu esm-infra-legacy/trusty *
Rustc Ubuntu focal *
Rustc Ubuntu groovy *
Rustc Ubuntu hirsute *
Rustc Ubuntu impish *
Rustc Ubuntu kinetic *
Rustc Ubuntu trusty *
Rustc Ubuntu trusty/esm *
Rustc Ubuntu upstream *
Rustc Ubuntu xenial *

Potential Mitigations

References