Patchwire CVEs, their patch status, and feeds to follow them

CVE-2022-21658

Fixed in a distro release EPSS 1%CVSS 7.3

Rust is a multi-paradigm, general-purpose programming language designed for performance and safety, especially safe concurrency. The Rust Security Response WG was notified that the `std::fs::remove_dir_all` standard library function is vulnerable a race condition enabling symlink following (CWE-363). 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. Rust 1.0.0 through Rust 1.58.0 is affected by this vulnerability with 1.58.1 containing a patch. Note that the following build targets don't have usable APIs to properly mitigate the attack, and are thus still vulnerable even with a patched toolchain: macOS before version 10.10 (Yosemite) and REDOX. We recommend everyone to update to Rust 1.58.1 as soon as possible, especially people developing programs expected to run in privileged contexts (including system daemons and setuid binaries), as those have the highest risk of being affected by this. Note that adding checks in your codebase before calling remove_dir_all will not mitigate the vulnerability, as they would also be vulnerable to race conditions like remove_dir_all itself. The existing mitigation is working as intended outside of race conditions.

Published 2022-01-20 · CVE record · OSV

Products: rust-lang rust

Distro releases

ReleasePackageFixed in
AlmaLinux:8cargo1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8cargo-doc1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8clippy1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rls1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-analysis1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-debugger-common1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-doc1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-gdb1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-lldb1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-src1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-std-static1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-std-static-wasm32-unknown-unknown1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-std-static-wasm32-wasi1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rust-toolset1.58.1-1.module_el8.6.0+2748+176088b3
AlmaLinux:8rustfmt1.58.1-1.module_el8.6.0+2748+176088b3
Debian:12rustc1.57.0+dfsg1-1
Debian:13rustc1.57.0+dfsg1-1
Debian:14rustc1.57.0+dfsg1-1
Red Hat:enterprise_linux:8cargo0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8cargo-debuginfo0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8cargo-doc0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8clippy0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8clippy-debuginfo0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rls0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rls-debuginfo0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-analysis0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-debugger-common0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-debuginfo0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-debugsource0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-doc0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-gdb0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-lldb0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-src0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-std-static0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-std-static-wasm32-unknown-unknown0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-std-static-wasm32-wasi0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rust-toolset0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rustfmt0:1.58.1-1.module+el8.6.0+14021+586eff1a
Red Hat:enterprise_linux:8rustfmt-debuginfo0:1.58.1-1.module+el8.6.0+14021+586eff1a
Rocky Linux:8rust0:1.58.1-1.module+el8.6.0+826+60f85975
Rocky Linux:8rust-toolset0:1.58.1-1.module+el8.6.0+826+60f85975
SUSE:Enterprise Storage 6rust1.53.0-22.1
SUSE:Enterprise Storage 7rust1.53.0-22.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-ESPOSrust1.53.0-22.1
SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSSrust1.53.0-22.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOSrust1.53.0-22.1
SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSSrust1.53.0-22.1
SUSE:Linux Enterprise High Performance Computing 15-ESPOSrust1.53.0-3.40.1
SUSE:Linux Enterprise High Performance Computing 15-LTSSrust1.53.0-3.40.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3rust1.59.0-150300.21.20.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3rust1.551.55.0-150300.7.6.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3rust1.561.56.1-150300.7.6.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3rust1.571.57.0-150300.7.7.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3rust1.581.58.0-150300.7.3.1
SUSE:Linux Enterprise Module for Development Tools 15 SP3rust1.591.59.0-150300.7.4.2
SUSE:Linux Enterprise Real Time 15 SP2rust1.53.0-22.1
SUSE:Linux Enterprise Server 15 SP1-BCLrust1.53.0-22.1
SUSE:Linux Enterprise Server 15 SP1-LTSSrust1.53.0-22.1
SUSE:Linux Enterprise Server 15 SP2-BCLrust1.53.0-22.1
SUSE:Linux Enterprise Server 15 SP2-LTSSrust1.53.0-22.1
SUSE:Linux Enterprise Server 15-LTSSrust1.53.0-3.40.1
SUSE:Linux Enterprise Server for SAP Applications 15rust1.53.0-3.40.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP1rust1.53.0-22.1
SUSE:Linux Enterprise Server for SAP Applications 15 SP2rust1.53.0-22.1
SUSE:Manager Proxy 4.1rust1.53.0-22.1
SUSE:Manager Retail Branch Server 4.1rust1.53.0-22.1
SUSE:Manager Server 4.1rust1.53.0-22.1
SUSE:Package Hub 15 SP3libredwg0.12.5-bp153.2.3.1
Ubuntu:20.04:LTSrustc1.59.0+dfsg1~ubuntu1~llvm-1~ubuntu1~20.04.2
Ubuntu:Pro:14.04:LTSrustcno fix
Ubuntu:Pro:16.04:LTSrustcno fix
openSUSE:Leap 15.3libredwg0.12.5-bp153.2.3.1
openSUSE:Leap 15.3rust1.53.0-22.1
openSUSE:Leap 15.3rust1.59.0-150300.21.20.1
openSUSE:Leap 15.3rust1.551.55.0-150300.7.6.1
openSUSE:Leap 15.3rust1.561.56.1-150300.7.6.1
openSUSE:Leap 15.3rust1.571.57.0-150300.7.7.1
openSUSE:Leap 15.3rust1.581.58.0-150300.7.3.1
openSUSE:Leap 15.3rust1.591.59.0-150300.7.4.2
openSUSE:Tumbleweedrust1.561.56.1-4.1
openSUSE:Tumbleweedrust1.571.57.0-3.1
openSUSE:Tumbleweedrust1.581.58.0-2.1