Description
Based on the discussion on #276, as well as on the "Security advisories for April 2020: rustqlite, os_str_bytes, flatbuffers" Reddit thread, it sounds like there are a number of people who do want to know about "unsound" crates (i.e. crates which present an unsound API in safe Rust), but do not in and of themselves contain a security vulnerability.
I think the best path forward here is to track these crates using informational advisories, similar to the ones we use for unmaintained crates. It'd be good to provide a precise technical definition of what is considered "unsound" (I'll defer to someone like @RalfJung for that), but in short: crates which provide APIs which do not uphold the invariants of safe Rust, or use unsafe in a way that does not uphold the invariants expected in correct unsafe code. Such crates don't contain a vulnerability in and of themselves (or else they would deserve security advisories), but can be misused by other crates in order to create code containing e.g. a concrete memory safety vulnerability.
We have both existing vulnerabilities in the database which fit this categorization, and some open requests to file them:
- Add advisory for bigint #290: Add advisory for bigint
- Advisory for rio #293: Advisory for rio
- SmallVec < 0.6.13 is unsound #299: SmallVec < 0.6.13 is unsound
Now granted some of these are debatable as to whether or not they should be classed as a security vulnerability (e.g. #293). That said, it seems to me this information is worth collecting and this will likely keep coming up.
Informational advisories are surfaced as warnings by cargo audit
(and cargo deny
), and are therefore kept out-of-band of security vulnerabilities (they can be escalated to a hard failure via the user opting in).
Given the, I propose adding a new "unsound" categorization for informational advisories to the following enum:
https://docs.rs/rustsec/0.20.0/rustsec/advisory/informational/enum.Informational.html
After that, we can review existing advisories which would fit within this categorization, and proceed filing advisories for the above three crates (bigint
, rio
, smallvec
)