Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

PoC: Samsung ONE Circle Format — Heap Buffer Overflow (OOB Read)

This repository contains a proof-of-concept demonstrating a heap-buffer-overflow (out-of-bounds read) in Samsung ONE's luci compiler when loading a malformed .circle model file.

Affected Component

  • compiler/luci/import/src/Nodes/CircleConst.cpp ~L214-221
  • compiler/luci/import/src/CircleReader.cpp ~L419-423
  • Confirmed on HEAD commit: de7f4736dc4c4f5e47f72a4022a9aa9ac6d1ad1a (2026-04-21)

Root Cause

The overflow guard in CircleConst.cpp is written as:

if (r_buffer->offset() + r_buffer->size() > reader->file_size())
{
    assert(false);   // stripped under -DNDEBUG (Release)
    return nullptr;  // becomes unreachable dead code, eliminated by compiler
}
memcpy(t_data, f_data, r_buffer->size());  // always executed — OOB read

Under Release (-O3 -DNDEBUG, confirmed in infra/nncc/cmake/ApplyCompileFlags.cmake:7-8), the assert is removed and the return is dead code. The memcpy reads past the end of the file buffer.

Reproducer

Build poc_lead_b.cpp with ASAN:

clang++ -std=c++17 -fsanitize=address -DNDEBUG -O1 -g \
  -I/path/to/circle/schema_generated.h \
  -I/path/to/flatbuffers/include \
  poc_lead_b.cpp -o poc_lead_b_asan
ASAN_OPTIONS=detect_leaks=0 ./poc_lead_b_asan

ASAN Output

[*] buf_offset=2, buf_size=999, file_size=1000
[*] NDEBUG: assert stripped, return dead — falling through to memcpy!
==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x619000000968
READ of size 999 at 0x619000000968 thread T0
    #0 in __asan_memcpy
    #1 in main poc_lead_b.cpp:111
0x619000000968 is located 0 bytes after 1000-byte region [0x619000000580,0x619000000968)
SUMMARY: AddressSanitizer: heap-buffer-overflow poc_lead_b.cpp:111 in main

Impact

Any process loading an untrusted .circle file (inference pipelines, circle2circle, circle-verify) is affected. The flatbuffers VerifyModelBuffer() verifier passes for the malicious file. A crafted file with Buffer.offset=2, Buffer.size > file_size-2 triggers the read.

  • Information disclosure: heap memory beyond the file buffer may contain sensitive runtime data
  • Denial of service: reliable crash
Downloads last month
36