Enviar #1050821: SqueezeAILab SqueezeLLM main Out-of-bounds writeinformación

TítuloSqueezeAILab SqueezeLLM main Out-of-bounds write
DescripciónSqueezeLLM's dense-and-sparse CUDA matvec kernel writes out of bounds when it processes a crafted checkpoint. A SqueezeLLM checkpoint ships a full_row_indices int32 buffer of shape (topX,) (topX defaults to num_dense_channels = 10), loaded verbatim as a registered buffer. The kernel vecquant4matmul_spmv_hybrid_nuq_perchannel performs atomicAdd(&mul[full_row_indices[col]], value) using the checkpoint's index value with no bound check; the only guard in the kernel (threadIdx.x < width) bounds the thread, not the index. load_state_dict shape-checks that topX matches but never validates the index values, and loading uses torch.load, which on modern torch (>= 2.6, weights_only=True by default; the witness ran torch 2.13) loads a plain int32 tensor as data, so the issue is a genuine memory-safety bug and not merely subsumed by pickle deserialization. A full_row_indices value outside the output-row range causes an out-of-bounds GPU write via atomicAdd into adjacent memory, a memory-corruption primitive. Confirmed on an NVIDIA A100 with compute-sanitizer (control clean, crafted index -> out-of-bounds write). Requires loading and running an untrusted checkpoint; not reachable with a legitimate model. A secondary out-of-bounds read exists in the same kernel's CSR handling (SPMV_ATOMIC, unchecked rows/cols). Fix: bound full_row_indices (and the CSR row/col indices) against the output row count at load and/or in the kernel.
Fuente⚠️ https://github.com/SqueezeAILab/SqueezeLLM/issues/77
Usuario
 m00dy (UID 97162)
Sumisión2026-10-21 23:17 (hace 1 mes)
Moderación2026-11-20 08:23 (29 days later)
EstadoAceptado
Entrada de VulDB441203 [SqueezeAILab SqueezeLLM hasta a5fd71f353bf569feb7b55737c1c1493e78e8f31 CUDA Matvec Kernel quant_cuda_kernel.cu vecquant4matmul_spmv_hybrid_nuq_perchannel full_row_indices desbordamiento de búfer]
Puntos20

Interested in the pricing of exploits?

See the underground prices here!