TFRecords Example bytes_list materialization DoS PoC
This repository contains a benign security research PoC for a .tfrecords
artifact that drives large protobuf materialization during
tf.train.Example.FromString(...).
Files:
control_same_size.tfrecordsmalicious_example_byteslist_10000000.tfrecordsreproduce.py
Observed behavior:
- control artifact:
- parses successfully with one
bytes_listitem
- parses successfully with one
- malicious artifact:
- same size as control
- parses successfully with
10,000,000bytes_listitems - materially increases peak RSS during normal parse
Reproduction:
python -m venv /tmp/tfrecord-byteslist-poc-venv
. /tmp/tfrecord-byteslist-poc-venv/bin/activate
pip install 'numpy<2' 'tensorflow==2.19.0'
TF_PYTHON_BIN="$(which python)" python3 build_poc.py
TF_PYTHON_BIN="$(which python)" python3 reproduce.py
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support