Downloads · 30 days
0
drogba771/circle-flatbuffers-index-validation-poc-DO-NOT-USE
circle-flatbuffers-index-validation-poc-DO-NOT-USE is a machine learning model from drogba771. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
WARNING: SECURITY RESEARCH - PROOF OF CONCEPT ONLY
Downloads · 30 days
0
Access
Public
Updated Jul 17, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md8.4 KB · 71%
From the Hugging Face model README
WARNING: SECURITY RESEARCH - PROOF OF CONCEPT ONLY
This repository contains malformed/crafted Circle (FlatBuffers) model files that trigger memory-safety crashes (out-of-bounds reads) in Samsung ONE's CircleImport.cpp loader. These are passive data files, not executable code — they do nothing on their own and only cause a crash when parsed by a vulnerable version of the Circle model loader.
DO NOT load these files with a production Circle/ONE runtime outside of an isolated, disposable research environment.
| File | Finding | CWE | Confirmation | Runtime Location |
|---|---|---|---|---|
| tensor_index_fuzz_poc.circle | Tensor index OOB — subgraph.tensors[input_num] via op->inputs()[i] | CWE-129 | ✅ Fuzz-confirmed (3 crashes) | CircleImport.cpp:855, :918, :936 |
| buffer_opcode_manual_poc.circle | Buffer index OOB — buffers[const_tensor.buffer]->data | CWE-129 | ✅ Manual-confirmed | CircleImport.cpp:875 |
| buffer_opcode_manual_poc.circle | Opcode index OOB — operator_codes[opcode_index] passed to ConvertSubgraph | CWE-129 | ✅ Manual-confirmed | CircleImport.cpp:1059 |
| redzone_read_poc.circle | FlatBuffers relative offset reads past buffer end (ASan redzone) | CWE-125 | ✅ Fuzz-confirmed | operator field accessor → op->inputs() |
circle-mlir toolchain with AddressSanitizer enabled.circle file through the standard model import path (CircleImport)VerifyModelBuffer() successfully but triggers an ASan-detected out-of-bounds read at the source locations listed aboveAll PoC files are structurally valid FlatBuffers — they pass the FlatBuffers verifier's structural checks. The vulnerability is that the verifier does NOT validate semantic consistency:
tensors.size()buffers.size()operator_codes.size()Samsung ONE's CircleImport.cpp uses unchecked std::vector::operator[] (or FlatBuffers Vector::Get()) to access tensors, buffers, and operator codes by their index, without verifying that the index is within bounds. The FlatBuffers verifier only ensures structural validity of the FlatBuffer fields, not that index values are valid references.
// CircleImport.cpp:855 — TENSOR INDEX OOB
auto &const_tensor = *subgraph.tensors[input_num]; // input_num from op->inputs()
// CircleImport.cpp:875 — BUFFER INDEX OOB
buffer = buffers[const_tensor.buffer]->data; // tensor.buffer from FlatBuffer
// CircleImport.cpp:1059 — OPCODE INDEX OOB
auto func_or_error = ConvertSubgraph(..., model->operator_codes, ...);
// Inside ConvertSubgraph: opcodes[op->opcode_index] is used unchecked
Add bounds checks before array accesses in CircleImport.cpp:
if (input_num < 0 || input_num >= subgraph.tensors.size()) { /* error */ return; }
if (const_tensor.buffer >= buffers.size()) { /* error */ return; }
if (opcode_index >= operator_codes.size()) { /* error */ return; }
Alternatively, replace operator[] with .at() which throws std::out_of_range.
tensor_index_fuzz_poc.circle (670 bytes) — verified by libFuzzer + ASan; triggers heap-buffer-overflow at tensor index accessbuffer_opcode_manual_poc.circle (524 bytes) — manually crafted with tensor.buffer=999 and opcode_index=999redzone_read_poc.circle (670 bytes) — fuzz-discovered; triggers SEGV via FlatBuffers offset past buffer endreport.md — Full vulnerability reportDiscovered by Onurcan Genc via coverage-guided fuzzing with libFuzzer + ASan + UBSan.