GPU VulnDB

Database/AI/ML frameworks & serving

llama.cpp: integer overflow in new_1batch undersizes the batch allocation

CVSS 8.5CVE-2026-70638AI/ML frameworks & servingcurated

Impact

new_1batch() multiplies sizeof(llama_seq_id) by a caller-supplied n_seq_max with no overflow check, so the allocation wraps and the subsequent writes run past the buffer. A crafted model file or a direct JNI call supplies the value. This is a distinct mechanism from the malloc/delete mismatch fixed in the same commit, so it is listed separately. Exposure is confined to deployments that build the LLaMA-Android binding; llama-server and CLI deployments do not reach this path.

Who can reach it

Local, with user interaction: someone who can supply a model file to, or make calls into, the Android binding. No service authentication is involved.

What to do

Upgrade to llama.cpp build b7446 or later (commit 5c0d188) and restart the serving process. A rebuild and daemon restart is the whole cost; no node drain. Not applicable if the Android JNI binding is not built.

References

Related entries

All AI/ML frameworks & serving entries

This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.