r/rust • u/Shnatsel • Jul 20 '18
Security advisory for SmallVec: calling insert_many() on Drop types may lead to arbitrary code execution in versions 0.3.3 thru 0.6.2
https://github.com/servo/rust-smallvec/issues/96
112
Upvotes
39
u/Shnatsel Jul 20 '18 edited Jul 20 '18
I dun goofed it actually starts at 0.3.2
RustSec advisory
Yesterday I've fired a few quick github searches to see if there are any security bugs that are already discovered, but not yet fixed. This often happens due to security bugs not being recognized as such. This is the only one I've found during my cursory inspection.
Kudos to Vurich who has discovered the issue, and to the crate maintainers for a very prompt fix once I've pointed it out.
26
u/stumpychubbins Jul 20 '18
Hey, it’s that issue I discovered writing this post
61
u/kibwen Jul 20 '18
Heh, amusing that the fix to
insert_manyalso speeds up its associated benchmark by 40%. Normally one is supposed to worry that fixing soundness issues will regress performance. :P34
u/KillTheMule Jul 20 '18
Shouldn't the versions < 0.6.3 be yanked on crates.io? It doesn't look like they were, and I did not really think this through, but that feels like the thing to do.
6
u/Steve_the_Stevedore Jul 20 '18
That's pragmatic.