Bug 1949207 (CVE-2021-28878)

Summary: CVE-2021-28878 rust: memory safety violation in Zip implementation when next_back() and next() are used together
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, igor.raits, jcajka, jistone, jpadman, mnewsome, rust-sig, TicoTimo, tstellar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: rust 1.52.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-10 13:28:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1949208, 1949209, 1953007, 1953008, 1959105, 1967940    
Bug Blocks: 1949215    

Description Guilherme de Almeida Suckevicz 2021-04-13 17:34:44 UTC
In the standard library in Rust before 1.52.0, the Zip implementation calls __iterator_get_unchecked() more than once for the same index (under certain conditions) when next_back() and next() are used together. This bug could lead to a memory safety violation due to an unmet safety requirement for the TrustedRandomAccess trait.


Upstream patch:

Comment 1 Guilherme de Almeida Suckevicz 2021-04-13 17:35:06 UTC
Created rust tracking bugs for this issue:

Affects: epel-7 [bug 1949209]
Affects: fedora-all [bug 1949208]

Comment 3 errata-xmlrpc 2021-08-10 07:26:09 UTC
This issue has been addressed in the following products:

  Red Hat Developer Tools

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

Comment 4 Product Security DevOps Team 2021-08-10 13:28:30 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):


Comment 5 errata-xmlrpc 2021-08-10 13:51:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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