safety-dance icon indicating copy to clipboard operation
safety-dance copied to clipboard

Audit smallvec

Open 64 opened this issue 6 years ago • 2 comments

Over 10k downloads/day and contains a lot of unsafe. Has had a number of vulnerabilities in the past.

64 avatar Jul 22 '19 18:07 64

Previous vulns for reference: https://github.com/RustSec/advisory-db/tree/master/crates/smallvec

There are still open concerns about use of uninitialized memory: https://github.com/servo/rust-smallvec/issues/126 https://github.com/servo/rust-smallvec/issues/139 Porting to MaybeUninit<T> would resolve them.

There is also not much internal consistency checking going on, making the crate hard to test: https://github.com/servo/rust-smallvec/issues/124

Shnatsel avatar Jul 22 '19 18:07 Shnatsel

PR for conversion to MaybeUninit is up: https://github.com/servo/rust-smallvec/pull/162

It will also require bumping the minimum supported Rust version, so a lot of unsafe code present for backwards-compatibility could be cleansed once this lands.

Shnatsel avatar Sep 08 '19 12:09 Shnatsel