YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
PyTorch mobile ISINSTANCE type OOB PoC
This repository demonstrates an out-of-bounds TypePtr read in PyTorch's lite-interpreter bytecode runtime.
What this PoC shows:
- a valid
.ptlmodel can be mutated by changing only one serializedISINSTANCEoperand - the function's serialized type table still has exactly 1 entry
- changing
ISINSTANCE.Nfrom1to2makesforward()crash the officialtorch-2.13.0+cpuwheel withSIGSEGV - the malformed model still returns normally on matching list input, but crashes on common non-matching inputs such as a tensor
What this PoC does not show:
- a stable memory disclosure primitive
- code execution
- a claim about every TorchScript loading path
Verified runtime:
- official
torch-2.13.0+cpuwheel
Run:
python3 poc_mobile_isinstance_type_oob.py --isinstance-n 1
python3 poc_mobile_isinstance_type_oob.py --isinstance-n 2
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support