Skip to content

Commit fd11c62

Browse files
committed
Advisory: Possible double free in SmallVec::insert_many
For details, see: * servo/rust-smallvec#96 - original bug report * servo/rust-smallvec#103 - fix
1 parent c21aa4a commit fd11c62

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[advisory]
2+
package = "smallvec"
3+
unaffected_versions = ["< 0.3.2"]
4+
patched_versions = [">= 0.6.3"]
5+
dwf = []
6+
url = "https://github.com/servo/rust-smallvec/issues/96"
7+
title = "Possible double free during unwinding in SmallVec::insert_many"
8+
date = "2018-07-19"
9+
description = """
10+
If an iterator passed to `SmallVec::insert_many` panicked in `Iterator::next`,
11+
destructors were run during unwinding while the vector was in an inconsistent
12+
state, possibly causing a double free (a destructor running on two copies of
13+
the same value).
14+
15+
This is fixed in smallvec 0.6.3 by ensuring that the vector's length is not
16+
updated to include moved items until they have been removed from their
17+
original positions. Items may now be leaked if `Iterator::next` panics, but
18+
they will not be dropped more than once.
19+
20+
Thank you to @Vurich for reporting this bug.
21+
"""

0 commit comments

Comments
 (0)