CVE-2022-21658
Description
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 couldnt 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 dont 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.
Risk Information
Associated Vulnerability
| Vulnerability | OS Platform |
|---|---|
| Multiple vulnerabilities are fixed in Mac OS - Monterey 12.3 (Software Update) - AutoReboot | Mac |
| Multiple vulnerabilities are fixed in Mac OS - Monterey 12.3.1 (Software Update) - AutoReboot | Mac |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update cargo-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update cargo-doc-1.58.1-1.module+el8.6.0+14021+586eff1a.noarch.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update clippy-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rls-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-analysis-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-debugger-common-1.58.1-1.module+el8.6.0+14021+586eff1a.noarch.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-debugsource-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-doc-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-gdb-1.58.1-1.module+el8.6.0+14021+586eff1a.noarch.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-lldb-1.58.1-1.module+el8.6.0+14021+586eff1a.noarch.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-src-1.58.1-1.module+el8.6.0+14021+586eff1a.noarch.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-std-static-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-std-static-wasm32-unknown-unknown-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-std-static-wasm32-wasi-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rust-toolset-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894) rust-toolset:rhel8 security, bug fix, and enhancement update rustfmt-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rls-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) cargo-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) clippy-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rustfmt-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-doc-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-gdb-1.58.1-1.module+el8.6.0+826+60f85975.noarch.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-src-1.58.1-1.module+el8.6.0+826+60f85975.noarch.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) cargo-doc-1.58.1-1.module+el8.6.0+826+60f85975.noarch.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-lldb-1.58.1-1.module+el8.6.0+826+60f85975.noarch.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-toolset-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-analysis-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-std-static-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-debugger-common-1.58.1-1.module+el8.6.0+826+60f85975.noarch.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-std-static-wasm32-wasi-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| rust-toolset:rhel8 security, bug fix, and enhancement update (RLSA-2022:1894) rust-std-static-wasm32-unknown-unknown-1.58.1-1.module+el8.6.0+826+60f85975.x86_64.rpm | Linux |
| (RHSA-2022:1894)Moderate: security, bug fix, and enhancement update cargo-debuginfo-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894)Moderate: security, bug fix, and enhancement update clippy-debuginfo-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894)Moderate: security, bug fix, and enhancement update rls-debuginfo-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894)Moderate: security, bug fix, and enhancement update rust-debuginfo-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| (RHSA-2022:1894)Moderate: security, bug fix, and enhancement update rustfmt-debuginfo-1.58.1-1.module+el8.6.0+14021+586eff1a.x86_64.rpm | Linux |
| SUSE-SU-2022:0149-1(SUSE Linux Enterprise Module for Development Tools 15-SP3 ) rust1.56-1.56.1-150300.7.6.1.x86_64.rpm | Linux |
| SUSE-SU-2022:0149-1(SUSE Linux Enterprise Module for Development Tools 15-SP3 ) cargo1.56-1.56.1-150300.7.6.1.x86_64.rpm | Linux |
| SUSE-SU-2022:0149-1(SUSE Linux Enterprise Module for Development Tools 15-SP3 ) rust1.56-debuginfo-1.56.1-150300.7.6.1.x86_64.rpm | Linux |
| SUSE-SU-2022:0149-1(SUSE Linux Enterprise Module for Development Tools 15-SP3 ) cargo1.56-debuginfo-1.56.1-150300.7.6.1.x86_64.rpm | Linux |
| Cargo update (ELSA-2022-1894) cargo-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Cargo-doc update (ELSA-2022-1894) cargo-doc-1.58.1-1.module+el8.6.0+20563+1eb4e043.noarch.rpm | Linux |
| Clippy update (ELSA-2022-1894) clippy-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rls update (ELSA-2022-1894) rls-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rust update (ELSA-2022-1894) rust-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rust-analysis update (ELSA-2022-1894) rust-analysis-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rust-debugger-common update (ELSA-2022-1894) rust-debugger-common-1.58.1-1.module+el8.6.0+20563+1eb4e043.noarch.rpm | Linux |
| Rust-doc update (ELSA-2022-1894) rust-doc-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rust-gdb update (ELSA-2022-1894) rust-gdb-1.58.1-1.module+el8.6.0+20563+1eb4e043.noarch.rpm | Linux |
| Rust-lldb update (ELSA-2022-1894) rust-lldb-1.58.1-1.module+el8.6.0+20563+1eb4e043.noarch.rpm | Linux |
| Rust-src update (ELSA-2022-1894) rust-src-1.58.1-1.module+el8.6.0+20563+1eb4e043.noarch.rpm | Linux |
| Rust-std-static update (ELSA-2022-1894) rust-std-static-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rust-std-static-wasm32-unknown-unknown update (ELSA-2022-1894) rust-std-static-wasm32-unknown-unknown-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rust-std-static-wasm32-wasi update (ELSA-2022-1894) rust-std-static-wasm32-wasi-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rust-toolset update (ELSA-2022-1894) rust-toolset-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| Rustfmt update (ELSA-2022-1894) rustfmt-1.58.1-1.module+el8.6.0+20563+1eb4e043.x86_64.rpm | Linux |
| rust Security Update (ALAS-2022-1817) rls-1.61.0-2.amzn2.0.1.x86_64.rpm | Linux |
| rust Security Update (ALAS-2022-1817) cargo-doc-1.61.0-2.amzn2.0.1.noarch.rpm | Linux |
Patch Details
Click to see the patches provided by ManageEngine for this CVE
| Patch ID | Patch Description |
|---|---|
| PATCH-608134 | Mac OS - Monterey 12.7.6 (Software Update) - AutoReboot (CVE-2024-27877) |
| PATCH-608134 | Mac OS - Monterey 12.7.6 (Software Update) - AutoReboot (CVE-2024-27877) |
References
https://nvd.nist.gov/vuln/detail/CVE-2023-1234
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-1234