hacnho's picture
Upload README.md with huggingface_hub
379cbbd verified
|
Raw
History Blame Contribute Delete
1.14 kB
---
tags:
- security
- proof-of-concept
- protobuf
license: mit
---
# Protocol Buffers Enum enumvalue materialization DoS PoC
This repository contains a benign security research PoC for a `.pb` artifact
that drives repeated-message materialization during
`type_pb2.Enum.ParseFromString(...)`.
Files:
- `control_one_name.pb`
- `malicious_enumvalue_5000000.pb`
- `reproduce.py`
Observed behavior:
- control artifact:
- parses successfully with no `enumvalue` entries
- malicious artifact:
- parses successfully with `5,000,000` `enumvalue` entries
- materially increases peak RSS during normal parse
Tested runtime:
```bash
python3 -m pip install protobuf==7.35.1
```
Public reproduction:
```bash
curl -L -O https://huggingface.co/hacnho/protobuf-enum-enumvalue-dos-poc/resolve/main/control_one_name.pb
curl -L -O https://huggingface.co/hacnho/protobuf-enum-enumvalue-dos-poc/resolve/main/malicious_enumvalue_5000000.pb
curl -L -O https://huggingface.co/hacnho/protobuf-enum-enumvalue-dos-poc/resolve/main/reproduce.py
python3 reproduce.py --control control_one_name.pb --malicious malicious_enumvalue_5000000.pb
```