YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Samsung ONE / luci Circle importer heap OOB read - proof of concept
Samsung ONE's luci imports .circle models. Its numeric constant reader (compiler/luci/import/src/Nodes/CircleConst.cpp, copy_data) sizes a read from the tensor shape product and reads that many elements from the model data buffer, with only an assert checking the buffer is large enough. Under a release build (NDEBUG) the assert is gone, and a malicious model whose shape product exceeds its buffer triggers a heap out of bounds read. The structural verifier circle::VerifyModelBuffer does not catch it. The string path was fixed (CVE-2026-6839); the numeric and four bit paths were not.
Files
oob_model.json- FlatBuffers text source of the malicious model (one FLOAT32 tensor, shape [1048576], 4 byte buffer, no operators, plain constant).oob_model.circle- the 272 byte malicious model, built with flatc.harness.cpp- a faithful harness driving the verbatim import path: real Circle schema, real FlatBuffers parse, realcircle::VerifyModelBuffer, real FlatBuffers vector backing store, verbatimVectorWrapperandcopy_data. Only the destination IR node is stubbed (sized correctly); the overflow is a read of the source buffer, identical to production.asan_trace.txt- AddressSanitizer heap buffer overflow read output.
Reproduce
Faithful harness (release semantics, NDEBUG so the assert is compiled out):
flatc --cpp res/CircleSchema/0.9/circle_schema.fbs
flatc -b res/CircleSchema/0.9/circle_schema.fbs oob_model.json
clang++ -std=c++17 -fsanitize=address -g -O1 -DNDEBUG -I <generated_hdr_dir> -I <flatbuffers/include> harness.cpp -o harness
./harness oob_model.circle
Or on the real tool: build ONE with -DCMAKE_BUILD_TYPE=Release and run circle2circle oob_model.circle out.circle.
Fix
Replace the assert in copy_data / copy_data_4 with a runtime check that raw_data.size() equals the element count times the element size, as already done for the string path.