-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined behavior in Rand #149
Conversation
Is there any practical impact out of this? I'm not aware of unaligned accesses being exploitable in practice. Does "provenance rules" mean "2 mutable pointers to the same thing"? |
Considering that the code in question should have been thoroughly tested on all our CI platforms to produce correct results, I think it quite unlikely there was any exploitable bug. |
No, they mean in this case that |
Does this refer to rust-random/rand#780 or to rust-random/rand#784? The former (rust-random/rand#780) is, to my knowledge, not de-facto UB with any existing Rust versions. Whether it is de jure UB is hard to say as Rust does not have an aliasing model at this point, but the code might become de jure and also de facto UB in the future. The provenance violation comes up in an experimental pointer provenance model for Rust (Stacked Borrows). While we do exploit provenance to some extend with The latter (rust-random/rand#784) is de-facto UB as we tell LLVM that those accesses are aligned. It has nothing to do with pointer provenance though. Whether this UB actually leads to bad code generation or is exploitable, I do not know. (This comes back to the question I raised a while ago: is UB [de facto or de jure] sufficient for an advisory?) EDIT: Oh I see, this adds advisories for both. Btw, it might be a good idea to also link to the issue and/or pull request so that one can get a better idea of what the flaw and fix look like. Not sure if the |
I added a link to the changelog, with contains the issue numbers. I'm also not sure whether I can specify multiple URLs instead. |
We've had a few tough calls on whether something deserves an advisory in the past. In #124, the more we studied it, the more it looked exploitable. As I look at this one, I feel the opposite: with more analysis I'm less and less convinced there's anything exploitable here. My feeling on this is it isn't worth an advisory unless someone can present a credible threat (even if hypothetical and far fetched). |
Closing this as unexploitable. Please reopen or refile if there is a credible threat. |
Add advisory for smallvec issue rustsec#149
Would it make sense to reopen this an an "informational (unsound)" advisory? |
@RalfJung reopened for discussion at least |
I guess it would encourage people to upgrade Rand. Does RustSec have a policy for "informational" advisories? |
The pointer provenance rules are not yet properly defined for Rust.
I rebased on master and removed the mention of pointer provenance rules. |
Co-authored-by: Ralf Jung <post@ralfj.de>
|
||
The flaw was corrected by Ralf Jung and Diggory Hardy. | ||
""" | ||
patched_versions = [">= 0.4.2"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look like the right toml format (maybe it changed); see https://github.com/RustSec/advisory-db#advisory-format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vks that is probably also the cause of the CI failure, though the message is quite cryptic:
error: error loading advisory DB repo from .: RustSec error: parse error: missing field `versions` at line 1 column 1
No description provided.