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 libp2p-core

Dependencies

(28 total, 21 outdated, 6 possibly insecure)

CrateRequiredLatestStatus
 asn1_der ⚠️^0.6.10.7.6out of date
 bs58^0.2.00.5.1out of date
 bytes^0.41.10.1out of date
 ed25519-dalek ⚠️^1.0.0-pre.12.1.1out of date
 failure^0.10.1.8up to date
 fnv^1.01.0.7up to date
 futures^0.10.3.31out of date
 lazy_static^1.21.5.0up to date
 libsecp256k1 ⚠️^0.2.20.7.2out of date
 log^0.40.4.27up to date
 parity-multiaddr^0.5.00.11.2out of date
 parity-multihash^0.1.00.2.3out of date
 multistream-select^0.4.00.13.0out of date
 parking_lot^0.80.12.4out of date
 protobuf ⚠️^2.33.7.2out of date
 quick-error^1.22.0.1out of date
 rand^0.60.9.1out of date
 ring ⚠️^0.140.17.14out of date
 rw-stream-sink^0.1.10.4.0out of date
 sha2^0.8.00.10.9out of date
 smallvec ⚠️^0.61.15.1out of date
 tokio-executor^0.1.40.1.10up to date
 tokio-io^0.10.1.13up to date
 unsigned-varint^0.20.8.0out of date
 untrusted^0.60.9.0out of date
 void^11.0.2up to date
 wasm-timer^0.10.2.5out of date
 zeroize^0.91.8.1out of date

Dev dependencies

(8 total, 5 outdated, 1 possibly insecure)

CrateRequiredLatestStatus
 assert_matches^1.31.5.0up to date
 env_logger^0.60.11.8out of date
 quickcheck^0.81.0.3out of date
 rand^0.60.9.1out of date
 tokio ⚠️^0.11.45.1out of date
 tokio-codec^0.10.1.2up to date
 tokio-mock-task^0.10.1.1up to date
 wasm-timer^0.10.2.5out of date

Security Vulnerabilities

asn1_der: Processing of maliciously crafted length fields causes memory allocation SIGABRTs

RUSTSEC-2019-0007

Affected versions of this crate tried to preallocate a vector for an arbitrary amount of bytes announced by the ASN.1-DER length field without further checks.

This allows an attacker to trigger a SIGABRT by creating length fields that announce more bytes than the allocator can provide.

The flaw was corrected by not preallocating memory.

libsecp256k1: Flaw in Scalar::check_overflow allows side-channel timing attack

RUSTSEC-2019-0027

Versions of libsecp256k1 prior to 0.3.1 did not execute Scalar::check_overflow in constant time.

This allows an attacker to potentially leak information via a timing attack.

The flaw was corrected by modifying Scalar::check_overflow to execute in constant time.

smallvec: Buffer overflow in SmallVec::insert_many

RUSTSEC-2021-0003

A bug in the SmallVec::insert_many method caused it to allocate a buffer that was smaller than needed. It then wrote past the end of the buffer, causing a buffer overflow and memory corruption on the heap.

This bug was only triggered if the iterator passed to insert_many yielded more items than the lower bound returned from its size_hint method.

The flaw was corrected in smallvec 0.6.14 and 1.6.1, by ensuring that additional space is always reserved for each item inserted. The fix also simplified the implementation of insert_many to use less unsafe code, so it is easier to verify its correctness.

Thank you to Yechan Bae (@Qwaz) and the Rust group at Georgia Tech’s SSLab for finding and reporting this bug.

libsecp256k1: libsecp256k1 allows overflowing signatures

RUSTSEC-2021-0076

libsecp256k1 accepts signatures whose R or S parameter is larger than the secp256k1 curve order, which differs from other implementations. This could lead to invalid signatures being verified.

The error is resolved in 0.5.0 by adding a check_overflow flag.

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.

ed25519-dalek: Double Public Key Signing Function Oracle Attack on `ed25519-dalek`

RUSTSEC-2022-0093

Versions of ed25519-dalek prior to v2.0 model private and public keys as separate types which can be assembled into a Keypair, and also provide APIs for serializing and deserializing 64-byte private/public keypairs.

Such APIs and serializations are inherently unsafe as the public key is one of the inputs used in the deterministic computation of the S part of the signature, but not in the R value. An adversary could somehow use the signing function as an oracle that allows arbitrary public keys as input can obtain two signatures for the same message sharing the same R and only differ on the S part.

Unfortunately, when this happens, one can easily extract the private key.

Revised public APIs in v2.0 of ed25519-dalek do NOT allow a decoupled private/public keypair as signing input, except as part of specially labeled "hazmat" APIs which are clearly labeled as being dangerous if misused.

protobuf: Crash due to uncontrolled recursion in protobuf crate

RUSTSEC-2024-0437

Affected version of this crate did not properly parse unknown fields when parsing a user-supplied input.

This allows an attacker to cause a stack overflow when parsing the mssage on untrusted data.

ring: Some AES functions may panic when overflow checking is enabled.

RUSTSEC-2025-0009

ring::aead::quic::HeaderProtectionKey::new_mask() may panic when overflow checking is enabled. In the QUIC protocol, an attacker can induce this panic by sending a specially-crafted packet. Even unintentionally it is likely to occur in 1 out of every 2**32 packets sent and/or received.

On 64-bit targets operations using ring::aead::{AES_128_GCM, AES_256_GCM} may panic when overflow checking is enabled, when encrypting/decrypting approximately 68,719,476,700 bytes (about 64 gigabytes) of data in a single chunk. Protocols like TLS and SSH are not affected by this because those protocols break large amounts of data into small chunks. Similarly, most applications will not attempt to encrypt/decrypt 64GB of data in one chunk.

Overflow checking is not enabled in release mode by default, but RUSTFLAGS="-C overflow-checks" or overflow-checks = true in the Cargo.toml profile can override this. Overflow checking is usually enabled by default in debug mode.