Downloads · 30 days
5
12% of all-time downloads
ybgwon96/llamacpp-clip-nmerge-oob-poc
llamacpp-clip-nmerge-oob-poc is a machine learning model from ybgwon96. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
huntr MFV PoC vs ggml-org/llama.cpp @ 2d97363 tools/mtmd/clip.cpp. Authorized security research (responsible disclosure via huntr).
Downloads · 30 days
5
12% of all-time downloads
All-time downloads
41
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.8 KB · 35%
From the Hugging Face model README
spatial_merge_size heap OOB writehuntr MFV PoC vs ggml-org/llama.cpp @ 2d97363
tools/mtmd/clip.cpp. Authorized security research (responsible disclosure via huntr).
merge_ratio = hparams.n_merge (mmproj GGUF clip.vision.spatial_merge_size) is bounded only to
[0,65536) (clip.cpp:1702, off-by-one lets 0 through). The Qwen2VL/Qwen3VL/GLM4V position-fill loop
(clip.cpp:3787-3810; PaddleOCR twin :3824) steps the outer loops by merge_ratio but hardcodes a 2x2
inner block, writing into a heap std::vector<int>(n_pos*4). n_merge=0 -> infinite outer loop ->
unbounded OOB write (SIGSEGV); n_merge=1 -> ~3x-of-buffer OOB write. Distinct from the MiniCPM-V
bucket_coords (#17) and set_pixel (#18) findings.
nmerge_repro.cpp / CRASH_PROVEN.md — isolated repro; EXC_BAD_ACCESS (write) at the positions store.gen_gguf_nmerge.py / poc_nmerge.gguf — malicious qwen2vl mmproj (spatial_merge_size=0).c++ -O0 -g nmerge_repro.cpp -o nmerge_repro && ./nmerge_repro 0 # EXC_BAD_ACCESS at positions[..]=..
Require n_merge == 2 (or bound writes vs positions.size()) for these projector types; fix the
< 0 off-by-one to <= 0.