CVE-2022-21658 (CNNVD-202201-1812)

HIGH
中文标题:
Rust 竞争条件问题漏洞
英文标题:
Race condition in std::fs::remove_dir_all in rustlang
CVSS分数: 7.3
发布时间: 2022-01-20 00:00:00
漏洞类型: 竞争条件问题
状态: PUBLISHED
数据质量分数: 0.30
数据版本: v3
漏洞描述
中文描述:

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类型:
CWE-367 CWE-363
标签:
(暂无数据)
受影响产品
厂商 产品 版本 版本范围 平台 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:*:*:*:*:*:*:*:*
解决方案
中文解决方案:
(暂无数据)
英文解决方案:
(暂无数据)
临时解决方案:
(暂无数据)
参考链接
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
FEDORA-2022-1bafa3fc91 vendor-advisory
cve.org
访问
FEDORA-2022-2c73789458 vendor-advisory
cve.org
访问
FEDORA-2022-1b76e3a192 vendor-advisory
cve.org
访问
FEDORA-2022-06569a0a60 vendor-advisory
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
无标题 OTHER
cve.org
访问
GLSA-202210-09 vendor-advisory
cve.org
访问
CVSS评分详情
3.1 (cna)
HIGH
7.3
CVSS向量: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:H
机密性
NONE
完整性
LOW
可用性
HIGH
时间信息
发布时间:
2022-01-20 00:00:00
修改时间:
2025-04-22 18:32:53
创建时间:
2025-11-11 15:37:17
更新时间:
2025-11-11 15:57:05
利用信息
暂无可利用代码信息
数据源详情
数据源 记录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
版本与语言
当前版本: v3
主要语言: EN
支持语言:
EN ZH
安全公告
暂无安全公告信息
变更历史
v3 CNNVD
2025-11-11 15:57:05
vulnerability_type: 未提取 → 竞争条件问题; cnnvd_id: 未提取 → CNNVD-202201-1812; data_sources: ['cve', 'nvd'] → ['cnnvd', 'cve', 'nvd']
查看详细变更
  • vulnerability_type: 未提取 -> 竞争条件问题
  • cnnvd_id: 未提取 -> CNNVD-202201-1812
  • data_sources: ['cve', 'nvd'] -> ['cnnvd', 'cve', 'nvd']
v2 NVD
2025-11-11 15:45:33
affected_products_count: 1 → 9; data_sources: ['cve'] → ['cve', 'nvd']
查看详细变更
  • affected_products_count: 1 -> 9
  • data_sources: ['cve'] -> ['cve', 'nvd']