CVE-2022-21658
概要

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.

公表日 2022年1月21日3:15
登録日 2022年1月21日10:00
最終更新日 2024年11月21日15:45
CVSS3.1 : MEDIUM
スコア 6.3
ベクター CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:H
攻撃元区分(AV) ローカル
攻撃条件の複雑さ(AC)
攻撃に必要な特権レベル(PR)
利用者の関与(UI) 不要
影響の想定範囲(S) 変更なし
機密性への影響(C) なし
完全性への影響(I)
可用性への影響(A)
CVSS2.0 : LOW
スコア 3.3
ベクター AV:L/AC:M/Au:N/C:N/I:P/A:P
攻撃元区分(AV) ローカル
攻撃条件の複雑さ(AC)
攻撃前の認証要否(Au) 不要
機密性への影響(C) なし
完全性への影響(I)
可用性への影響(A)
全ての特権を取得 いいえ
ユーザー権限を取得 いいえ
その他の権限を取得 いいえ
ユーザー操作が必要 いいえ
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:* 1.0.0 1.58.0
構成2 以上 以下 より上 未満
cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
構成3 以上 以下 より上 未満
cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:* 12.0.0 12.3
cpe:2.3:o:apple:tvos:*:*:*:*:*:*:*:* 15.4
cpe:2.3:o:apple:iphone_os:*:*:*:*:*:*:*:* 15.4
cpe:2.3:o:apple:ipados:*:*:*:*:*:*:*:* 15.4
cpe:2.3:o:apple:watchos:*:*:*:*:*:*:*:* 8.5
関連情報、対策とツール
共通脆弱性一覧

JVN脆弱性情報
Rust における Time-of-check Time-of-use (TOCTOU) 競合状態の脆弱性
タイトル Rust における Time-of-check Time-of-use (TOCTOU) 競合状態の脆弱性
概要

Rust には、 Time-of-check Time-of-use (TOCTOU) 競合状態の脆弱性が存在します。

想定される影響 情報を改ざんされる、およびサービス運用妨害 (DoS) 状態にされる可能性があります。
対策

ベンダより正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

公表日 2022年1月20日0:00
登録日 2023年3月23日14:19
最終更新日 2025年4月14日14:59
影響を受けるシステム
アップル
iOS 
iPadOS 
macOS 
tvOS 
watchOS 
Fedora Project
Fedora 
The Rust Programming Language
Rust 1.0.0 から 1.58.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2023年03月23日]
  掲載
2023年3月23日14:19
2 [2025年04月14日]
  参考情報:JVN (JJVNVU#90506697) を追加
  参考情報:ICS-CERT ADVISORY (ICSA-25-100-02) を追加
2025年4月14日13:37