Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- security
|
| 4 |
+
- proof-of-concept
|
| 5 |
+
- msgpack
|
| 6 |
+
license: mit
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# MessagePack array32 repeated-empty-string materialization DoS PoC
|
| 10 |
+
|
| 11 |
+
This repository contains a benign security research PoC for a `.msgpack`
|
| 12 |
+
artifact that drives large in-memory materialization during
|
| 13 |
+
`msgpack.unpackb(..., raw=False)`.
|
| 14 |
+
|
| 15 |
+
Files:
|
| 16 |
+
|
| 17 |
+
- `control_bin32_same_size.msgpack`
|
| 18 |
+
- `malicious_array32_empty_strings_20000000.msgpack`
|
| 19 |
+
- `reproduce.py`
|
| 20 |
+
|
| 21 |
+
Observed behavior:
|
| 22 |
+
|
| 23 |
+
- control artifact:
|
| 24 |
+
- parses successfully as one `bytes` object
|
| 25 |
+
- malicious artifact:
|
| 26 |
+
- same size as control
|
| 27 |
+
- parses successfully as a list of `20,000,000` empty strings
|
| 28 |
+
- materially increases peak RSS during normal unpack
|
| 29 |
+
|
| 30 |
+
Reproduction:
|
| 31 |
+
|
| 32 |
+
```bash
|
| 33 |
+
python3 build_poc.py
|
| 34 |
+
python3 reproduce.py
|
| 35 |
+
```
|