YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
PoC β TensorRT plugin-deserialization out-of-bounds read (huntr MFV)
Gated security PoC. Access restricted to huntr/ProtectAI triage (protectai-bot).
Loading an attacker-supplied serialized TensorRT engine triggers a heap out-of-bounds read during plugin deserialization. TensorRT's legacy plugins deserialize with a read<T>() helper (plugin/common/plugin.h:100) that memcpys and advances a cursor with no remaining-length tracking; a file-controlled count (regionPlugin.cpp:117 smTreeTemp->n) then drives a read loop (:152) that walks past the serialized-data buffer.
Reached via the public API IRuntime::deserializeCudaEngine(blob, size) β RegionPluginCreator::deserializePlugin β new Region(serialData, serialLength).
Files
evil_region_plugin.binβ the attacker-controlled serialized-plugin payload (theserialDatabytes embedded in a crafted.engine).make_evil_blob.pyβ generates the payload; documents the exact byte layout.asan_repro.cppβ faithful repro of the exact sink (verbatimread<T>+Regiondeserialize ctor read-loop).evidence.txtβ full AddressSanitizer transcript.
Reproduce
python3 make_evil_blob.py
g++ -std=c++17 -fsanitize=address -g asan_repro.cpp -o asan_repro
./asan_repro evil_region_plugin.bin # -> AddressSanitizer: heap-buffer-overflow, READ of size 4
CWE-125 (Out-of-bounds Read); CWE-190 / CWE-787 for the DoS and 32-bit overflow-write variants. Fix: bound every count against the remaining serialized-data length before allocating/reading (as plugin/common/serialize.hpp already does).