These reviews are from cargo-vet. To add your review, set up cargo-vet
and submit your URL to its registry.
6.1.1 (current)
From google/supply-chain copy of google/rust-crate-audits. By Taylor Cramer.
Reviewed in CL 545304248
Many issues found across the lexical
family of crates:
- https://github.com/Alexhuszagh/rust-lexical/pull/103
- https://github.com/Alexhuszagh/rust-lexical/issues/104
- https://github.com/Alexhuszagh/rust-lexical/issues/101
- https://github.com/Alexhuszagh/rust-lexical/issues/95
- Beyond the above issues, review was not completed on the unchecked indexing
6.1.1 (current)
From kornelski/crev-proofs copy of git.savannah.gnu.org.
Packaged for Guix (crates-io)
cargo-vet does not verify reviewers' identity. You have to fully trust the source the audits are from.
- ub-risk-4
-
Extreme unsoundness.
Full description of the audit criteria can be found at https://github.com/google/rust-crate-audits/blob/main/auditing_standards.md#ub-risk-4
- does-not-implement-crypto (implies crypto-safe)
-
Inspection reveals that the crate in question does not attempt to implement any cryptographic algorithms on its own.
Note that certification of this does not require an expert on all forms of cryptography: it's expected for crates we import to be "good enough" citizens, so they'll at least be forthcoming if they try to implement something cryptographic. When in doubt, please ask an expert.
- crypto-safe
Implied by other criteria
All crypto algorithms in this crate have been reviewed by a relevant expert.
Note: If a crate does not implement crypto, use
does-not-implement-crypto
, which impliescrypto-safe
, but does not require expert review in order to audit for.- unknown
-
May have been packaged automatically without a review
Lib.rs has been able to verify that all files in the crate's tarball are in the crate's repository. Please note that this check is still in beta, and absence of this confirmation does not mean that the files don't match.
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories, so there is a possibility that published crates have a misleading repository URL, or contain different code from the code in the repository.
To review the actual code of the crate, it's best to use cargo crev open lexical
. Alternatively, you can download the tarball of lexical v6.1.1 or view the source online.
lexical
contains multiple soundness issues:BytesIter
trait has safety invariants but is public and not markedunsafe
write_float()
callsMaybeUninit::assume_init()
on uninitialized data, which is is not allowed by the Rust abstract machineThe crate also has some correctness issues and appears to be unmaintained.
Alternatives
For quickly parsing floating-point numbers third-party crates are no longer needed. A fast float parsing algorith by the author of
lexical
has been merged into libcore.For quickly parsing integers, consider
atoi
andbtoi
crates (100% safe code).atoi_radix10
provides even faster parsing, but only with-C target-cpu=native
, and at the cost of someunsafe
.For formatting integers in a
#[no_std]
context consider thenumtoa
crate.For working with big numbers consider
num-bigint
andnum-traits
.https://github.com/Alexhuszagh/rust-lexical/issues/102
https://github.com/Alexhuszagh/rust-lexical/issues/101
https://github.com/Alexhuszagh/rust-lexical/issues/95
https://github.com/Alexhuszagh/rust-lexical/issues/104
GHSA-c2hm-mjxv-89r4