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

(24 total, 14 outdated, 4 possibly insecure)

CrateRequiredLatestStatus
 asn1_der ⚠️^0.6.10.7.6out of date
 bs58^0.3.00.5.1out of date
 ed25519-dalek ⚠️^1.0.0-pre.32.1.1out of date
 fnv^1.01.0.7up to date
 futures^0.3.10.3.30up to date
 futures-timer^33.0.3up to date
 lazy_static^1.21.4.0up to date
 libsecp256k1 ⚠️^0.3.10.7.1out of date
 log^0.40.4.21up to date
 parity-multiaddr^0.7.20.11.2out of date
 parity-multihash^0.2.10.2.3up to date
 multistream-select^0.7.00.13.0out of date
 parking_lot^0.10.00.12.1out of date
 pin-project^0.4.61.1.5out of date
 prost^0.6.10.12.4out of date
 rand^0.70.8.5out of date
 ring^0.16.90.17.8out of date
 rw-stream-sink^0.2.00.4.0out of date
 sha2^0.8.00.10.8out of date
 smallvec ⚠️^1.01.13.2maybe insecure
 thiserror^1.01.0.59up to date
 unsigned-varint^0.30.8.0out of date
 void^11.0.2up to date
 zeroize^11.7.0up to date

Dev dependencies

(3 total, 1 outdated)

CrateRequiredLatestStatus
 async-std^1.01.12.0up to date
 quickcheck^0.9.01.0.3out of date
 wasm-timer^0.20.2.5up to 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.

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.

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.