ONNX Model Zoo

treforbenbow/tensorrt-dos-poc-input-while-loop

By treforbenbow · ↓ 0 · ♥ 0 · Updated 2026-03-04

What's in this repo

This page lists the files in treforbenbow/tensorrt-dos-poc-input-while-loop, including while_loop.onnx.

  • 1 ONNX models (.onnx files)
  • 5 files, including 1 .md, 1 .py, 1 .engine, 1 .onnx
  • Last updated 2026-03-04

ONNX files

File Size Download
while_loop.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

TensorRT VULN-004: Input-Controlled DoS via While-Loop Models

Vulnerability

A structurally valid ONNX model (351 bytes) using a condition-dependent Loop operator hangs indefinitely during TensorRT inference when given a malicious input value. The model works correctly with normal inputs but hangs permanently with extreme inputs.

Distinct from VULN-003

  • VULN-003: Malicious MODEL with static INT64_MAX trip count
  • VULN-004: Normal MODEL + malicious INPUT data
  • VULN-003 fix (validate max_trip_count) does NOT prevent this
  • Requires runtime protection: inference timeout / iteration budget

Impact

  • Input-controlled DoS for any TRT model using while-loops
  • Attacker only needs to send a single malicious float value
  • Affects Triton, TensorRT-LLM, any TRT-based pipeline
  • Model is structurally valid -- cannot be detected by static analysis

Files

File Description
vuln004_input_dos.py Main PoC script
while_loop.onnx While-loop ONNX model (351 bytes)
while_loop.engine Compiled TRT engine (11,124 bytes)

Reproduction

pip install tensorrt onnx torch numpy
python vuln004_input_dos.py

Results

  • counter=10: completes in 0.001s
  • counter=1000: completes in 0.055s
  • counter=1e6: HANGS indefinitely
  • counter=1e30: HANGS indefinitely
  • counter=FLT_MAX: HANGS indefinitely
  • No timeout, no warning, no error

Model info

onnx region:us
↓ 0 ♥ 0

Created: 2026-03-04

Updated: 2026-03-04

View on Hugging Face

Files (5)

.gitattributes
README.md
vuln004_input_dos.py
while_loop.engine
while_loop.onnx ONNX

Related models