Invia #1050811: Vahe1994 AQLM main Out-of-Bounds Readinformazioni

TitoloVahe1994 AQLM main Out-of-Bounds Read
DescrizioneAQLM's Triton gemv dequant kernel reads out of bounds when it processes a crafted AQLM checkpoint. An AQLM checkpoint ships a codes index tensor that selects entries from a codebooks tensor. When the checkpoint routes to the Triton gemv path (codebook_size not in {256, 65536}, e.g. a 12-bit / 4096-entry codebook with out_group_size == 1), a codes value greater than or equal to codebook_size indexes the codebooks tensor out of bounds. The kernel (inference_kernels/triton_kernel.py:78-102) applies only a negative-wrap adjustment to the code (codes_i + (codes_i < 0) * codebook_size), not an upper bound, and the % codebook_size clamp that would bound it is present but commented out at triton_kernel.py:83-84. The load path performs no value-range check on codes. A code >= codebooks.shape[1] therefore reads past the codebooks allocation, an out-of-bounds GPU read that crashes the CUDA context (denial of service) and can expose adjacent GPU memory. The PyTorch reference path applies a % (2**nbits) mask and is safe; only the Triton path reads raw. Confirmed on AQLM main with compute-sanitizer on an NVIDIA A100 (control clean, crafted code -> out-of-bounds read of the codebooks tensor, hundreds of KB past an 8192-byte allocation). Requires loading and running an untrusted checkpoint; not reachable with a legitimate model. Fix: re-enable the modulo clamp or reject out-of-range codes at load.
Fonte⚠️ https://github.com/Vahe1994/AQLM/issues/191
Utente
 m00dy (UID 97162)
Sottomissione21/10/2026 23:11 (29 giorni fa)
Moderazione19/11/2026 23:20 (29 days later)
StatoAccettato
Voce VulDB440920 [Vahe1994 AQLM fino a e79a896ed6656fe4ed06193d42d004e7d0bbdbb2 Triton Kernel triton_kernel.py codes rivelazione di informazioni]
Punti20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!