TFLite Heap OOB Read β PoC
Crafted .tflite model that triggers a heap out-of-bounds read in TFLite's InterpreterBuilder::operator() at interpreter_builder.cc:839.
Files
poc.tfliteβ 189-byte malformed TFLite model (crafted SubGraph vtable offset)reproduce.shβ One-command reproduction script
Quick Reproduction
chmod +x reproduce.sh
./reproduce.sh
What Happens
BuildFromFile("poc.tflite")succeeds β the model passesValidateModelBuffers()InterpreterBuilder::operator()accessessubgraph->operators()which follows a corrupted vtable offset- The read resolves to 2,920 bytes before the allocated heap region β SEGV / heap-buffer-overflow
Affected Code Path
Python's tf.lite.Interpreter(model_path=...) calls BuildFromFile which does NOT run the FlatBuffers Verifier, making this exploitable through the standard Python API.
Target
- TensorFlow v2.18.0 (commit
6550e4bd) - CWE-125: Out-of-bounds Read
- Downloads last month
- -
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support