Bug 2041504 (CVE-2022-21658) - CVE-2022-21658 rust: Race condition in remove_dir_all leading to removal of files outside of the directory being removed
Summary: CVE-2022-21658 rust: Race condition in remove_dir_all leading to removal of f...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-21658
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2042021 2042022 2042023 2042024 2042025 2042026 2043030 2043031 2046285 2060692 2064964 2064965
Blocks: 2041505 2043032
TreeView+ depends on / blocked
 
Reported: 2022-01-17 14:29 UTC by Marian Rehak
Modified: 2022-09-26 14:03 UTC (History)
26 users (show)

Fixed In Version: rust 1.58.1
Doc Type: If docs needed, set a value
Doc Text:
A race condition flaw was found in Rust's std::fs::remove_dir_all function. Rust applications that use this function may be vulnerable to a race condition where an unprivileged attacker can trick the application into deleting files and directories, causing an impact on system data integrity. If the application is privileged, an attacker can possibly delete files they would not usually have access to.
Clone Of:
Environment:
Last Closed: 2022-05-11 03:45:31 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:1894 0 None None None 2022-05-10 14:11:34 UTC

Description Marian Rehak 2022-01-17 14:29:13 UTC
The `std::fs::remove_dir_all` standard library function is vulnerable to a race condition enabling symlink following. An attacker could use this security issue to trick a privileged program into deleting files and directories the attacker couldn't otherwise access or delete.

Comment 2 Marian Rehak 2022-01-20 14:09:43 UTC
Created rust tracking bugs for this issue:

Affects: epel-7 [bug 2043031]
Affects: fedora-all [bug 2043030]

Comment 6 errata-xmlrpc 2022-05-10 14:11:31 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:1894 https://access.redhat.com/errata/RHSA-2022:1894

Comment 7 Product Security DevOps Team 2022-05-11 03:45:28 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-2022-21658


Note You need to log in before you can comment on or make changes to this bug.