This project might be open to known security vulnerabilities, which can be prevented by tightening the version range of affected dependencies. Find detailed information at the bottom.

Crate shadowsocks-rust

Dependencies

(31 total, 19 outdated, 4 possibly insecure)

CrateRequiredLatestStatus
 base64^0.90.22.0out of date
 byte_string^1.01.0.0up to date
 byteorder^1.21.5.0up to date
 bytes^0.41.6.0out of date
 clap^24.5.4out of date
 digest^0.70.10.7out of date
 dns-parser^0.70.8.0out of date
 env_logger^0.50.11.3out of date
 futures^0.10.3.30out of date
 json5^0.20.4.1out of date
 libc^0.20.2.153up to date
 libsodium-ffi^0.10.2.2out of date
 log^0.40.4.21up to date
 lru-cache^0.10.1.2up to date
 md-5^0.70.10.6out of date
 miscreant^0.4.0-betaN/Aup to date
 openssl ⚠️^0.100.10.64maybe insecure
 qrcode^0.70.14.0out of date
 rand^0.50.8.5out of date
 ring^0.130.17.8out of date
 serde^1.01.0.198up to date
 serde_urlencoded^0.50.7.1out of date
 spin ⚠️^0.40.9.8out of date
 time ⚠️^0.10.3.36out of date
 tokio ⚠️^0.11.37.0out of date
 tokio-io^0.10.1.13up to date
 tokio-process^0.2.30.2.5up to date
 tokio-signal^0.20.2.9up to date
 trust-dns-resolver^0.100.23.2out of date
 typenum^1.101.17.0up to date
 url^12.5.0out of date

Security Vulnerabilities

spin: Wrong memory orderings in RwLock potentially violates mutual exclusion

RUSTSEC-2019-0013

Wrong memory orderings inside the RwLock implementation allow for two writers to acquire the lock at the same time. The drop implementation used Ordering::Relaxed, which allows the compiler or CPU to reorder a mutable access on the locked data after the lock has been yielded.

Only users of the RwLock implementation are affected. Users of Once (including users of lazy_static with the spin_no_std feature enabled) are NOT affected.

On strongly ordered CPU architectures like x86, the only real way that this would lead to a memory corruption is if the compiler reorders an access after the lock is yielded, which is possible but in practice unlikely. It is a more serious issue on weakly ordered architectures such as ARM which, except in the presence of certain instructions, allow the hardware to decide which accesses are seen at what times. Therefore on an ARM system it is likely that using the wrong memory ordering would result in a memory corruption, even if the compiler itself doesn't reorder the memory accesses in a buggy way.

The flaw was corrected by https://github.com/mvdnes/spin-rs/pull/66.

time: Potential segfault in the time crate

RUSTSEC-2020-0071

Impact

Unix-like operating systems may segfault due to dereferencing a dangling pointer in specific circumstances. This requires an environment variable to be set in a different thread than the affected functions. This may occur without the user's knowledge, notably in a third-party library.

The affected functions from time 0.2.7 through 0.2.22 are:

  • time::UtcOffset::local_offset_at
  • time::UtcOffset::try_local_offset_at
  • time::UtcOffset::current_local_offset
  • time::UtcOffset::try_current_local_offset
  • time::OffsetDateTime::now_local
  • time::OffsetDateTime::try_now_local

The affected functions in time 0.1 (all versions) are:

  • at
  • at_utc
  • now

Non-Unix targets (including Windows and wasm) are unaffected.

Patches

Pending a proper fix, the internal method that determines the local offset has been modified to always return None on the affected operating systems. This has the effect of returning an Err on the try_* methods and UTC on the non-try_* methods.

Users and library authors with time in their dependency tree should perform cargo update, which will pull in the updated, unaffected code.

Users of time 0.1 do not have a patch and should upgrade to an unaffected version: time 0.2.23 or greater or the 0.3 series.

Workarounds

A possible workaround for crates affected through the transitive dependency in chrono, is to avoid using the default oldtime feature dependency of the chrono crate by disabling its default-features and manually specifying the required features instead.

Examples:

Cargo.toml:

chrono = { version = "0.4", default-features = false, features = ["serde"] }
chrono = { version = "0.4.22", default-features = false, features = ["clock"] }

Commandline:

cargo add chrono --no-default-features -F clock

Sources:

tokio: Data race when sending and receiving after closing a `oneshot` channel

RUSTSEC-2021-0124

If a tokio::sync::oneshot channel is closed (via the oneshot::Receiver::close method), a data race may occur if the oneshot::Sender::send method is called while the corresponding oneshot::Receiver is awaited or calling try_recv.

When these methods are called concurrently on a closed channel, the two halves of the channel can concurrently access a shared memory location, resulting in a data race. This has been observed to cause memory corruption.

Note that the race only occurs when both halves of the channel are used after the Receiver half has called close. Code where close is not used, or where the Receiver is not awaited and try_recv is not called after calling close, is not affected.

See tokio#4225 for more details.

openssl: `openssl` `X509VerifyParamRef::set_host` buffer over-read

RUSTSEC-2023-0044

When this function was passed an empty string, openssl would attempt to call strlen on it, reading arbitrary memory until it reached a NUL byte.