This project contains known security vulnerabilities. Find detailed information at the bottom.

Crate tor-llcrypto

Dependencies

(29 total, 3 outdated, 1 insecure, 2 possibly insecure)

CrateRequiredLatestStatus
 aes^0.80.8.4up to date
 base64ct^1.5.11.6.0up to date
 cipher^0.4.30.4.4up to date
 ctr^0.90.9.2up to date
 curve25519-dalek ⚠️^4.14.1.3maybe insecure
 der-parser^99.0.0up to date
 derive-deftly^0.14.20.14.2up to date
 derive_more^1.0.01.0.0up to date
 digest^0.10.00.10.7up to date
 ed25519-dalek^2.12.1.1up to date
 educe^0.4.60.6.0out of date
 getrandom^0.2.30.2.15up to date
 hex^0.40.4.3up to date
 openssl ⚠️^0.10.480.10.68maybe insecure
 rand_core^0.6.20.6.4up to date
 rsa ⚠️^0.9.00.9.7insecure
 safelog^0.4.10.4.2up to date
 serde^1.0.1031.0.215up to date
 sha1^0.10.00.10.6up to date
 sha2^0.10.00.10.8up to date
 sha3^0.10.60.10.8up to date
 signature^22.2.0up to date
 subtle^22.6.1up to date
 thiserror^12.0.3out of date
 tor-memquota^0.24.00.25.0out of date
 typenum^1.15.01.17.0up to date
 visibility^0.1.00.1.1up to date
 x25519-dalek^2.0.02.0.1up to date
 zeroize^11.8.1up to date

Dev dependencies

(5 total, 1 outdated)

CrateRequiredLatestStatus
 cipher^0.4.10.4.4up to date
 hex-literal^0.40.4.1up to date
 rand^0.80.8.5up to date
 serde_test^1.0.1241.0.177up to date
 tor-basic-utils^0.24.00.25.0out of date

Security Vulnerabilities

rsa: Marvin Attack: potential key recovery through timing sidechannels

RUSTSEC-2023-0071

Impact

Due to a non-constant-time implementation, information about the private key is leaked through timing information which is observable over the network. An attacker may be able to use that information to recover the key.

Patches

No patch is yet available, however work is underway to migrate to a fully constant-time implementation.

Workarounds

The only currently available workaround is to avoid using the rsa crate in settings where attackers are able to observe timing information, e.g. local use on a non-compromised computer is fine.

References

This vulnerability was discovered as part of the "Marvin Attack", which revealed several implementations of RSA including OpenSSL had not properly mitigated timing sidechannel attacks.

curve25519-dalek: Timing variability in `curve25519-dalek`'s `Scalar29::sub`/`Scalar52::sub`

RUSTSEC-2024-0344

Timing variability of any kind is problematic when working with potentially secret values such as elliptic curve scalars, and such issues can potentially leak private keys and other secrets. Such a problem was recently discovered in curve25519-dalek.

The Scalar29::sub (32-bit) and Scalar52::sub (64-bit) functions contained usage of a mask value inside a loop where LLVM saw an opportunity to insert a branch instruction (jns on x86) to conditionally bypass this code section when the mask value is set to zero as can be seen in godbolt:

A similar problem was recently discovered in the Kyber reference implementation:

https://groups.google.com/a/list.nist.gov/g/pqc-forum/c/hqbtIGFKIpU/m/cnE3pbueBgAJ

As discussed on that thread, one portable solution, which is also used in this PR, is to introduce a volatile read as an optimization barrier, which prevents the compiler from optimizing it away.

The fix can be validated in godbolt here:

The problem was discovered and the solution independently verified by Alexander Wagner [email protected] and Lea Themint [email protected] using their DATA tool:

https://github.com/Fraunhofer-AISEC/DATA

openssl: `MemBio::get_buf` has undefined behavior with empty buffers

RUSTSEC-2024-0357

Previously, MemBio::get_buf called slice::from_raw_parts with a null-pointer, which violates the functions invariants, leading to undefined behavior. In debug builds this would produce an assertion failure. This is now fixed.