CVE-2022-21658 (CNNVD-202201-1812)
中文标题:
Rust 竞争条件问题漏洞
英文标题:
Race condition in std::fs::remove_dir_all in rustlang
漏洞描述
中文描述:
Rust是Mozilla基金会的一款通用、编译型编程语言。 Rust 中存在竞争条件问题漏洞,该漏洞源于产品的std::fs::remove_dir_all函数未对用户权限进行有效验证。攻击者可通过该漏洞删除不能访问的文件和目录。以下产品及版本受到影响:Rust 1.0.0 至 1.58.0 版本。
英文描述:
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.
CWE类型:
标签:
受影响产品
| 厂商 | 产品 | 版本 | 版本范围 | 平台 | CPE |
|---|---|---|---|---|---|
| rust-lang | rust | < 1.58.1 | - | - |
cpe:2.3:a:rust-lang:rust:<_1.58.1:*:*:*:*:*:*:*
|
| rust-lang | rust | * | - | - |
cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:*
|
| fedoraproject | fedora | 34 | - | - |
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
|
| fedoraproject | fedora | 35 | - | - |
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
|
| apple | ipados | * | - | - |
cpe:2.3:o:apple:ipados:*:*:*:*:*:*:*:*
|
| apple | iphone_os | * | - | - |
cpe:2.3:o:apple:iphone_os:*:*:*:*:*:*:*:*
|
| apple | macos | * | - | - |
cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*
|
| apple | tvos | * | - | - |
cpe:2.3:o:apple:tvos:*:*:*:*:*:*:*:*
|
| apple | watchos | * | - | - |
cpe:2.3:o:apple:watchos:*:*:*:*:*:*:*:*
|
解决方案
中文解决方案:
英文解决方案:
临时解决方案:
参考链接
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
cve.org
CVSS评分详情
3.1 (cna)
HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H
时间信息
利用信息
数据源详情
| 数据源 | 记录ID | 版本 | 提取时间 |
|---|---|---|---|
| CVE | cve_CVE-2022-21658 |
2025-11-11 15:21:16 | 2025-11-11 07:37:17 |
| NVD | nvd_CVE-2022-21658 |
2025-11-11 14:58:13 | 2025-11-11 07:45:33 |
| CNNVD | cnnvd_CNNVD-202201-1812 |
2025-11-11 15:10:48 | 2025-11-11 07:57:05 |
版本与语言
安全公告
变更历史
查看详细变更
- vulnerability_type: 未提取 -> 竞争条件问题
- cnnvd_id: 未提取 -> CNNVD-202201-1812
- data_sources: ['cve', 'nvd'] -> ['cnnvd', 'cve', 'nvd']
查看详细变更
- affected_products_count: 1 -> 9
- data_sources: ['cve'] -> ['cve', 'nvd']