Skip to content

Commit 3cb0a91

Browse files
authored
Add disclosure for hasbrown's borsh encoding (#2100)
* Add disclosure for hasbrown's borsh encoding * Remove when hashbrown was patched It's unclear with what version it will be and when it will be. I'd prefer to make this valid and file-able now than risk someone starting to use this functionality (which will make removing it more complicated). * Update RUSTSEC-0000-0000.md * Be more specific regarding affected
1 parent 7c294ea commit 3cb0a91

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
```toml
2+
[advisory]
3+
id = "RUSTSEC-0000-0000"
4+
package = "hashbrown"
5+
date = "2024-10-11"
6+
url = "https://github.com/rust-lang/hashbrown/issues/576"
7+
categories = []
8+
keywords = ["borsh"]
9+
10+
[versions]
11+
patched = [">= 0.15.1"]
12+
unaffected = ["<= 0.14"]
13+
14+
[affected]
15+
functions = { "hashbrown::HashMap::borsh_serialize" = ["=0.15.0"] }
16+
```
17+
18+
# Borsh serialization of HashMap is non-canonical
19+
20+
The borsh serialization of the HashMap did not follow the borsh specification.
21+
It potentially produced non-canonical encodings dependent on insertion order.
22+
It also did not perform canonicty checks on decoding.
23+
24+
This can result in consensus splits and cause equivalent objects to be
25+
considered distinct.
26+
27+
This was patched in 0.15.1.

0 commit comments

Comments
 (0)