| Título | DeepSeek-AI DeepGEMM 2.8.1 (commit 5081f851, main; also 057ca59) Memory Corruption |
|---|
| Descrição | DeepGEMM 2.8.1 (deepseek-ai/DeepGEMM) contains an out-of-bounds write (CWE-787) in its MQA-logits kernels, reachable from the public API deep_gemm.fp8_fp4_mqa_logits and its paged/sparse variants. The output "logits" tensor row stride is derived solely from the scalar max_seqlen_k, while the device kernel writes each query row's KV span at a column computed from caller-supplied sequence-length tensor (cu_seq_len_k_start/cu_seq_len_k_end) and the real KV length seq_len_kv, bounded only by those values and not by the allocated stride. The invariant max_seqlen_k >= max_i(min(cu_seq_len_k_end[i], seq_len_kv) - cu_seq_len_k_start[i]) is never enforced, so a smaller max_seqlen_k causes a large out-of-bounds write into GPU global memory, enabling denial of service, cross-tenant information disclosure and integrity loss, and a potential device write-what-where. The paged (max_context_len vs context_lens) and sparse variants share the same root cause. |
|---|
| Fonte | ⚠️ https://github.com/deepseek-ai/DeepGEMM/issues/481 |
|---|
| Utilizador | Sx4DoW (UID 102838) |
|---|
| Submissão | 08/11/2026 20h33 (há 22 dias) |
|---|
| Moderação | 30/11/2026 14h45 (22 days later) |
|---|
| Estado | Aceite |
|---|
| Entrada VulDB | 445441 [DeepSeek-AI DeepGEMM 2.8.1/2.8.2 csrc/apis/attention.hpp fp8_fp4_mqa_logits max_seqlen_k Excesso de tampão] |
|---|
| Pontos | 20 |
|---|