Protocol Buffers GeneratedCodeInfo annotation materialization DoS PoC

This repository contains a benign security research PoC for a .pb artifact that drives repeated-message materialization during descriptor_pb2.GeneratedCodeInfo.ParseFromString(...).

Files:

  • control_one_annotation.pb
  • malicious_annotation_5000000.pb
  • reproduce.py

Observed behavior:

  • control artifact:
    • parses successfully with one annotation entry
  • malicious artifact:
    • parses successfully with 5,000,000 annotation entries
    • materially increases peak RSS during normal parse

Tested runtime:

python3 -m pip install protobuf==7.35.1

Public reproduction:

curl -L -O https://huggingface.co/hacnho/protobuf-generatedcodeinfo-annotation-dos-poc/resolve/main/control_one_annotation.pb
curl -L -O https://huggingface.co/hacnho/protobuf-generatedcodeinfo-annotation-dos-poc/resolve/main/malicious_annotation_5000000.pb
curl -L -O https://huggingface.co/hacnho/protobuf-generatedcodeinfo-annotation-dos-poc/resolve/main/reproduce.py
python3 reproduce.py --control control_one_annotation.pb --malicious malicious_annotation_5000000.pb

Public files:

  • https://huggingface.co/hacnho/protobuf-generatedcodeinfo-annotation-dos-poc/resolve/main/control_one_annotation.pb
  • https://huggingface.co/hacnho/protobuf-generatedcodeinfo-annotation-dos-poc/resolve/main/malicious_annotation_5000000.pb
  • https://huggingface.co/hacnho/protobuf-generatedcodeinfo-annotation-dos-poc/resolve/main/reproduce.py
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support