В ядре Linux устранена следующая уязвимость:
idpf: привязанное заполнение регистра вектора прерывания к выделенному массиву
idpf_get_reg_intr_vecs() заполняет выделенный вызывающей стороной массив reg_vals[] из
ответ VIRTCHNL2_OP_ALLOC_VECTORS в адаптере->req_vec_chunks, ограничивающий
его внутренний цикл определяется только количеством num_vectors для каждого фрагмента. Массив имеет размер
отдельно: idpf_intr_reg_init() выделяет
kzalloc_objs(struct idpf_vec_regs, total_vecs) из
caps.num_allocated_vectors и проверяет возвращаемый счетчик только после
заполнить. Сумма num_vectors для каждого блока никогда не сверяется с
total_vecs, поэтому ответ содержит небольшое количество num_allocated_vectors, но фрагменты
суммирование более высоких записей после конца reg_vals[].
Влияние: плоскость управления (модель устройства PF или гипервизора), которая возвращает
VIRTCHNL2_OP_ALLOC_VECTORS ответ, сумма num_vectors на блок которого превышает
num_allocated_vectors записывает записи структуры idpf_vec_regs после конца
выделение reg_vals kmalloc (запись за пределы плиты KASAN). Привязал цикл заполнения к емкости массива, переданной вызывающими объектами,
зеркалирование родственного idpf_vport_get_q_reg(). Существующие
проверка num_regs < num_vecs затем отклоняет ответ меньшего размера без
запись за пределами поля происходит в первую очередь.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: idpf: bound interrupt-vector register fill to the allocated array idpf_get_reg_intr_vecs() fills the caller-allocated reg_vals[] array from the VIRTCHNL2_OP_ALLOC_VECTORS reply in adapter->req_vec_chunks, bounding its inner loop only by the per-chunk num_vectors. The array is sized separately: idpf_intr_reg_init() allocates kzalloc_objs(struct idpf_vec_regs, total_vecs) from caps.num_allocated_vectors and only checks the returned count after the fill. The sum of per-chunk num_vectors is never reconciled against total_vecs, so a reply with a small num_allocated_vectors but chunks summing higher writes past the end of reg_vals[]. Impact: a control plane (a PF or hypervisor device model) that returns a VIRTCHNL2_OP_ALLOC_VECTORS reply whose per-chunk num_vectors sum exceeds num_allocated_vectors writes struct idpf_vec_regs entries past the end of the reg_vals kmalloc allocation (KASAN slab-out-of-bounds write). Bound the fill loop to the array capacity passed in by the callers, mirroring the sibling idpf_vport_get_q_reg(). The existing num_regs < num_vecs check then rejects an undersized reply without the out-of-bounds write happening first.
Характеристики атаки
Последствия
Строка CVSS v3.1