Skip to content

Commit 1203312

Browse files
committed
heapless: use-after-free when cloning partially consumed Iterator
1 parent aa3b156 commit 1203312

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "heapless"
5+
date = "2010-11-02"
6+
url = "https://github.com/japaric/heapless/issues/181"
7+
categories = ["memory-corruption", "memory-exposure"]
8+
keywords = ["use-after-free"]
9+
informational = "unsound"
10+
11+
[affected.functions]
12+
"heapless::vec::IntoIter::clone" = ["<= 0.6"]
13+
14+
[versions]
15+
patched = []
16+
```
17+
18+
# Use-after-free when cloning a partially consumed `Vec` iterator
19+
20+
The `IntoIter` `Clone` implementation clones the whole underlying `Vec`.
21+
If the iterator is partially consumed the consumed items will be copied, thus creating a use-after-free access.
22+
23+
A proof of concept is available in the original bug report.

0 commit comments

Comments
 (0)