Related Vulnerabilities: CVE-2021-28875  

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.

Severity Medium

Remote Yes

Type Arbitrary code execution

Description

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.

AVG-1803 rust 1:1.49.0-1 1:1.50.0-1 Medium Fixed

https://github.com/rust-lang/rust/issues/80894
https://github.com/rust-lang/rust/pull/80895
https://github.com/rust-lang/rust/commit/ce48709405270cae2dfdf99d9a8d57a4f672ad34
https://github.com/rust-lang/rust/commit/59b6b1101fee97ece51ab7b91036e15b0188463b