Downloads · 30 days
0
AgentRen/tensorrt-loop-body-input-oob-poc
tensorrt-loop-body-input-oob-poc is a machine learning model from AgentRen. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repo contains a small malformed ONNX model that triggers a deterministic crash in onnx-tensorrt's Loop importer.
Downloads · 30 days
0
Access
Public
Updated Feb 4, 2026
Repo size
394 B
Likes
0
Public
Click a slice to open those files.
.py18.3 KB · 58%
From the Hugging Face model README
This repo contains a small malformed ONNX model that triggers a deterministic crash in onnx-tensorrt's Loop importer.
The ONNX Loop operator has a body subgraph.
onnx-tensorrt assumes that the number of inputs in the loop body subgraph is at least the number of inputs on the outer Loop node.
If a malicious ONNX model provides a Loop node with 3 inputs (trip-count, condition, state0) but the body graph contains only 2 inputs, the parser indexes body.input(2) out-of-bounds while mapping state variables.
poc_loop_body_input_oob.onnx – malformed ONNX modelmake_poc_loop_body_input_oob.py – generator script (does not require the onnx pip package)gen/onnx_pb2.py – protobuf bindings generated from onnx.prototrtexectrtexec --onnx=poc_loop_body_input_oob.onnx --verbose
Expected result: process crash / abort during ONNX parse or network build.
Any code path that calls the TensorRT ONNX parser on this model should reproduce, e.g. nvonnxparser::IParser::parseFromFile().
# Requires: python3 + protobuf runtime, and a generated onnx_pb2 (already included in gen/)
python3 make_poc_loop_body_input_oob.py poc_loop_body_input_oob.onnx