b12556
A vulnerability in llama.cpp's HRM layer count validation allows integer overflow due to improper handling of uint32_t multiplication, leading to potential buffer overflows during tensor loading. The issue arises when the product of n_hrm_layers_per_stack, n_hrm_h_cycles, and (n_hrm_l_cycles + 1) is computed as a uint32_t and compared to block_count, enabling maliciously crafted inputs to pass validation despite exceeding the actual block count.


