File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,21 @@ added, or a variable's contents being enlarged.
33
33
This is shown to occur on Linux, but it will also likely occur on any other platform where ` getenv `
34
34
and ` setenv ` are not thread-safe, though trigger conditions may vary widely.
35
35
36
+ ## Affected Code
37
+
36
38
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 > .
38
43
39
44
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.
You can’t perform that action at this time.
0 commit comments