-
Notifications
You must be signed in to change notification settings - Fork 9
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
Multiple soundness issues in Chunk and InlineArray #11
Comments
EDIT: tools like |
As @bodil seems to be busy right now (at least, there doesn't seem to be much activity on the profile), I've decided to give it a look. May I ask how thorough audid of the code have you done? Should I try going over the code after I get through the other half (I need to figure out what the general idea with the |
|
Hey, thanks for the suggestions, but that's not what I was asking :-) Actually, I've already submitted the pull request to fix 1-3 before that. I think I have an idea for 4 that doesn't require padding bytes (and considering padding bytes would make the capacity computation a bit harder), which I'm going to write now. What I was asking was, how confident are you there are not more soundness issues? Were you thorough, or are these some things you've noticed, but there are possibly others you haven't looked for? |
This is case 4 of bodil#11. In addition: * Make sure the header is also aligned. * Sanity check some promised properties (like, having the same size as the passed type) * Use ptr::write for initializing the header, to not create a reference to uninitialized data.
This is case 4 of bodil#11. In addition: * Make sure the header is also aligned. * Sanity check some promised properties (like, having the same size as the passed type) * Use ptr::write for initializing the header, to not create a reference to uninitialized data.
I was focusing on specific type of bugs, so it is possible that there are other types of bugs still present in the codebase. |
Hello, we have noticed a soundness issue and/or a potential security vulnerability in this crate while performing a security scan on crates.io.
Description
Chunk:
unit()
andpair()
.From<InlineArray<A, T>>
.Clone
andinsert_from
are not panic-safe; A panicking iterator causes memory safety issues with them.InlineArray:
Demonstration
Output:
Return Code: 0
The text was updated successfully, but these errors were encountered: