Bug 1949189 (CVE-2020-36317)

Summary: CVE-2020-36317 rust: memory safety violation in String::retain()
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: amulhern, bodavis, igor.raits, jcajka, jistone, jpadman, mcermak, mnewsome, rust-sig, TicoTimo, tstellar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rust 1.49.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-05-18 20:38:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1896712, 1951680, 1951701, 1951702    
Bug Blocks: 1949215    

Description Guilherme de Almeida Suckevicz 2021-04-13 17:03:35 UTC
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.

Reference:
https://github.com/rust-lang/rust/issues/78498

Upstream patch:
https://github.com/rust-lang/rust/pull/78499

Comment 6 errata-xmlrpc 2021-05-18 16:14:29 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:1935 https://access.redhat.com/errata/RHSA-2021:1935

Comment 7 Product Security DevOps Team 2021-05-18 20:38:43 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-36317

Comment 8 errata-xmlrpc 2021-06-03 10:55:47 UTC
This issue has been addressed in the following products:

  Red Hat Developer Tools

Via RHSA-2021:2243 https://access.redhat.com/errata/RHSA-2021:2243