Skip to content

Commit 7d47527

Browse files
authored
Update RUSTSEC-0000-0000.md
1 parent a285059 commit 7d47527

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

crates/openssl-probe/RUSTSEC-0000-0000.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,21 @@ added, or a variable's contents being enlarged.
3333
This is shown to occur on Linux, but it will also likely occur on any other platform where `getenv`
3434
and `setenv` are not thread-safe, though trigger conditions may vary widely.
3535

36+
## Affected Code
37+
3638
The affected function is `try_init_ssl_cert_env_vars` in
37-
<https://github.com/alexcrichton/openssl-probe/blob/db67c9e5b333b1b4164467b17f5d99207fad004c/src/lib.rs#L65>.
39+
<https://github.com/alexcrichton/openssl-probe/blob/db67c9e5b333b1b4164467b17f5d99207fad004c/src/lib.rs#L65>, and
40+
any other library's function which may call this function directly or indirectly
41+
<https://github.com/search?q=try_init_ssl_cert_env_vars&type=code>. `native_tls <= 0.2.12` may
42+
do so in certain configurations <https://github.com/sfackler/rust-native-tls/blob/2424bc5efd1b8b4bcf60dbda93259a3f29db7f06/Cargo.toml>.
3843

3944
The crate's author released a fix in versions `>=0.1.6` which marks these functions as `unsafe` and `#[deprecated]`.
45+
46+
## Alternative Mitigations
47+
48+
In the case of glibc users, some thread-safety improvements may protect you from `setenv`/`getenv` clashes
49+
which were introduced in <https://github.com/bminor/glibc/commit/7a61e7f557a97ab597d6fca5e2d1f13f65685c61>,
50+
however direct `environ` access in multithreaded programs will still risk dangling pointer access.
51+
52+
Users of other `libc` implementations should consult their sourcecode listings for thread-safety guarantees
53+
around multithreaded environment read/write access, though readers should be prepared to be disappointed.

0 commit comments

Comments
 (0)