| --- |
| license: mit |
| tags: [security, poc, executorch] |
| --- |
| # Harmless PoC: ExecuTorch MethodMeta I/O index vector length OOB |
|
|
| `MethodMeta::num_inputs` / `input_tag` (and `num_outputs` / `output_tag`) index `ExecutionPlan.inputs[index]` / `outputs[index]` using a forged FlatBuffer vector length with no bound against the program buffer. Under default `Program::Verification::Minimal`, loading a malicious `.pte` and calling `input_tag(0)` triggers ASan heap-buffer-overflow READ at `method_meta.cpp:171`. |
|
|
| Distinct from submitted MethodMeta `Tensor.sizes`, packaged Program `execution_plan` / `backend_delegate_data`, constant/mutable offsets, and Method::init values/operators/delegates/list-items. |
|
|
| ## Files |
| - `poc_method_io_index_asan.cpp`, `asan.log`, `asan_outputs_oob.log` |
| - `method_load_stub.cpp` (link stub for unused `Method::load`) |
| - `NOTES.md` |
|
|
| ```bash |
| ./poc_method_io_index_asan inputs-oob |
| # ./poc_method_io_index_asan outputs-oob |
| ``` |
|
|