Bug 1949192 (CVE-2020-36318)

Summary: CVE-2020-36318 rust: use-after-free or double free in VecDeque::make_contiguous
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: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: amulhern, bodavis, cbuissar, 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:46 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: 1951720, 1951721, 1951724    
Bug Blocks: 1949215    

Description Guilherme de Almeida Suckevicz 2021-04-13 17:09:03 UTC
In the standard library in Rust before 1.49.0, VecDeque::make_contiguous has a bug that pops the same element more than once under certain condition. This bug could result in a use-after-free or double free.

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

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

Comment 1 Cedric Buissart 2021-04-16 15:28:30 UTC
Statement:

VecDeque::make_contiguous is not considered stable is versions of rust prior to 1:48. As a result, it should not be used as shipped in Red Hat Enterprise Linux versions 8.3 and older.

Comment 2 Josh Stone 2021-04-16 18:20:53 UTC
FWIW, that fix was also beta-backported in time for the 1.49.0 release.
https://github.com/rust-lang/rust/pull/79903

Comment 7 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 8 Product Security DevOps Team 2021-05-18 20:38:46 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-36318

Comment 9 errata-xmlrpc 2021-06-03 10:55:54 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