CVE-2026-138092
llama.cpp roll validation invokes signed overflow for an extreme shift
ggml-org · llama.cpp
First documented disclosure · Review checkpoint
Summary
The tensor roll constructor can evaluate an overflowing absolute value before rejecting an invalid shift.
Severity and exploitation evidence
Medium · 4.8/10 · CVSS 4.0. Severity source.
Exploitation not established: Public researcher or maintainer evidence establishes the reported behavior, not malicious exploitation or identified victims. No payload, package, model or proof of concept was executed during this review.
Technical severity is not a measure of observed attacks or of risk to your deployment. Attempts, demonstrations, and successful compromise retain the qualifications in the source.
How the weakness works
ggml_roll used abs() on a signed int. INT_MIN cannot be represented as a positive int, so validation itself invoked undefined behavior. The final patch uses signed comparisons against tensor dimensions.
Conditions required
A caller must supply an extreme shift to the tensor operation. The report demonstrates a local UBSan failure; it does not establish delivery through a model file or a remotely exposed inference endpoint.
Potential impact
Undefined behavior and possible process failure in the local tensor operation. Remote code execution or a malicious-GGUF exploit is not established.
Affected versions and configurations
CNA enumerates 0.1 through 0.8.0 as affected.
Fix and mitigation status
Stable v0.9.0 was released November 4. The tagged ggml_roll implementation contains the signed-safe checks from commit 0978a6e9022fb9bd6874b86154ee304e81929b9f, merged November 3.
Practical next steps
Update the affected llama.cpp implementation and validate tensor-operation parameters at any untrusted input boundary.
Operating lesson
Input validation must not invoke undefined behavior while evaluating an invalid value.
Evidence and limits
The original public PR was opened October 12. Static patch and tagged-source review supports the issue-specific correction; no runtime exploit test was performed. Issuing CNA publication was 2026-11-28; this is distinct from the earlier original disclosure and any later index ingestion. Severity is VulDB CNA CVSS 4.0 Medium 4.8. CNA also supplies CVSS 3.1 Medium 5.3.
Sources
- Original public report
Primary source ·
- Merged issue-specific patch
Primary source ·
- Stable v0.9.0 release
Primary source ·
- Tagged corrected tensor implementation
Primary source ·
- Issuing CNA record
Primary source ·