-
Couldn't load subscription status.
- Fork 161
Closed
Description
Recently reported #148 and #149 are memory safety issues and may be exploitable. They need to be properly disclosed:
- Identify the affected crate versions
- Yank vulnerable versions from crates.io
- File an advisory in https://github.com/RustSec/advisory-db
I have tried to track down the commits that introduced these bugs:
- use-after-free when growing to the same size #148 is caused by 4d02e41 and affects versions 0.6.5 onwards until the fix is landed in 0.6.10
- My testcase points to Using
growto shrink can cause corruption. #149 being introduced in b24b3d2 but that doesn't make sense to me. If I am correct, that would make 0.6.3 and later vulnerable; possibly 0.6.2 as well but there is no 0.6.2 tag in git, so cannot check that.
The testcase I'm using to check for #149 is as follows:
let mut v: SmallVec<[u8; 2]> = SmallVec::new();
v.push(1);
v.push(2);
v.push(3);
assert!(v.spilled());
v.clear();
// Shrink to inline.
v.grow(2);
assert_eq!(v.capacity(), 2);dvdplm and 8573lucab
Metadata
Metadata
Assignees
Labels
No labels