Qeravio
Canonical AI event

GGML Tensor Size Overflow Guard Added in llama.cpp

The fix prevents tensor size overflow in gguf_init_from_reader. The test case includes a tensor size of 2^64 - 16.

1 Oct 20261 verified claims1 sources1 observations
What happened

The official source reports this update: b11275: gguf : reject tensor size that wraps after padding. gguf : reject tensor size that wraps after padding ( #26979 ) GGML_PAD(nbytes, alignment) wraps to 0 when nbytes is within (alignment - 1) of SIZE_MAX, which silently bypassed the size overflow guard in gguf_init_from_reader. Reject the tensor before padding when nbytes + (alignment - 1) would overflow. Adds a test-gguf handcrafted case (F32, ne = [4, 2^30-1, 2^30+1, 1]) whose ggml_nbytes = 2^64 - 16 lands in the wrap window. Fails on master, passes with the guard.

Why it matters

This official update documents a development concerning b11275: gguf : reject tensor size that wraps after padding. Its practical significance depends on the scope and evidence stated by the source.

What to watch next

Read the official source update and verify its stated scope, evidence and timing before acting on it.

Connected knowledge

Entities affected by this event

Continue this topic
Evidence trail

Sources behind the event