@@ -10,7 +10,7 @@ author: The Rust Security Response WG
10
10
[ advisory ] : https://groups.google.com/g/rustlang-security-announcements/c/R1fZFDhnJVQ
11
11
12
12
The Rust Security Response WG was notified that the ` std::fs::remove_dir_all `
13
- standard library function is vulnerable a race condition enabling symlink
13
+ standard library function is vulnerable to a race condition enabling symlink
14
14
following (CWE-363). An attacker could use this security issue to trick a
15
15
privileged program into deleting files and directories the attacker couldn't
16
16
otherwise access or delete.
@@ -29,7 +29,7 @@ follow the symlink from `temp/foo` to `sensitive/` while recursively deleting,
29
29
resulting in ` sensitive/ ` being deleted.
30
30
31
31
To prevent such attacks, ` std::fs::remove_dir_all ` already includes protection
32
- to avoid recursively deleting symlinks, as described in its documentation:
32
+ to avoid recursively deleting symlinks, as described in [ its documentation] [ 4 ] :
33
33
34
34
> This function does ** not** follow symbolic links and it will simply remove
35
35
> the symbolic link itself.
@@ -87,3 +87,4 @@ Crichton for writing the WASI fix, and Mara Bos for reviewing the patches.
87
87
[ 1 ] : https://www.cve.org/CVERecord?id=CVE-2022-21658
88
88
[ 2 ] : https://github.com/rust-lang/wg-security-response/tree/master/patches/CVE-2022-21658
89
89
[ 3 ] : https://www.rust-lang.org/policies/security
90
+ [ 4 ] : https://doc.rust-lang.org/std/fs/fn.remove_dir_all.html
0 commit comments