0.12.2 (older version)
From kornelski/crev-proofs copy of git.savannah.gnu.org.
This review is from cargo-vet. To add your review, set up cargo-vet
and submit your URL to its registry.
The current version of StringInterner is 0.18.0.
0.12.2 (older version)
From kornelski/crev-proofs copy of git.savannah.gnu.org.
cargo-vet does not verify reviewers' identity. You have to fully trust the source the audits are from.
May have been packaged automatically without a review
These reviews are from Crev, a distributed system for code reviews. To add your review, set up cargo-crev
.
The current version of StringInterner is 0.18.0.
0.7.1 (older version) Thoroughness: None Understanding: None
by dpc on 2019-10-12
Issue: Medium (RUSTSEC-2019-0023)
0.7.1 (older version) Thoroughness: Medium Understanding: High
by lo48576 on 2019-09-02
I have reviewed the previous version (0.7.0) and sent some patches to make the crate safer.
In this version, I found no security problems and no malicious code.
unsafe
at line 158 is safe because
InternalStrRef
s and strings referred by them are immutable,InternalStrRef
s won't be dropped until the owning interner is dropped,*const str
referring inside private Vec<Box<str>>
which is owned by the same interner, andInternalStrRef
s are not taken or copied to the outside of StringInterner
type.unsafe impl
s at line 248 and 254 is safe as commented in the source.
Vec<Box<str>>
is not changed until the owning interner is dropped.InternalStrRef
s and their content pointers are not exposed to the users.I think this crate is safe to use.
0.7.0 (older version) Thoroughness: Medium Understanding: Medium
by lo48576 on 2019-10-09
EDIT: The found unsoundness is reported as vulnerability (RUSTSEC-2019-0023). This is already fixed in 0.7.1, so you should use 0.7.1 or above.
I've found unsoundness and reported it: https://github.com/Robbepop/string-interner/issues/9.
This is use after free, but user cannot access that dangling pointer directly,
and invalid write access will not happen.
This issue is caused by StringInterner::clone()
followed by StringInterner::{get,get_or_intern}
,
so this would affect many use cases.
This is the reason of negative rating.
Except for that issue, there seems no problem.
unsafe
at line 125 is safe thanks to assert!
at the previous line.unsafe
at line 165 is safe because
InternalStrRef
s are immutable,*const str
referring inside private Vec<Box<str>>
, andInternalStrRef
s are not taken or copied to the outside of StringInterner
type.InternalStrRef
refers string owned by another interner instance,
and it is reported as stated above.)unsafe impl
s at line 233 and 239 is safe as commented in the source.
Vec<Box<str>>
is not changed until drop.InternalStrRef
and its content pointers are not exposed to the users.Once the UB bug is fixed, this crate would be safe.
Issue: Medium (RUSTSEC-2019-0023)
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories. There is absolutely no guarantee that the repository URL declared by the crate belongs to the crate, or that the code in the repository is the code inside the published tarball.
To review the actual code of the crate, it's best to use cargo crev open string-interner
. Alternatively, you can download the tarball of string-interner v0.18.0 or view the source online.
Packaged for Guix (crates-io)