mirror of
https://github.com/rustsec/advisory-db.git
synced 2025-12-27 01:54:07 -05:00
635 B
635 B
[advisory]
id = "CVE-2020-36317"
package = "std"
categories = ["memory-corruption"]
date = "2020-10-28"
url = "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-36317"
[versions]
patched = [">= 1.49.0"]
unaffected = ["< 1.26.0"]
String::retain allows safely creating invalid strings when abusing panic
In the standard library in Rust before 1.49.0, String::retain() function has a panic safety problem. It allows creation of a non-UTF-8 Rust string when the provided closure panics. This bug could result in a memory safety violation when other string APIs assume that UTF-8 encoding is used on the same string.