В ядре Linux устранена следующая уязвимость:
net: hns3: использование num_tqps в драйвере vf для подачи заявки на ресурсы
В настоящее время hdev->htqp выделяется с помощью hdev->num_tqps и kinfo->tqp.
выделяется с помощью kinfo->num_tqps. Однако для параметра kinfo->num_tqps установлено значение
мин (new_tqps, hdev->num_tqps); Поэтому kinfo->num_tqps может быть меньше.
чем hddev->num_tqps, что приводит к тому, что часть hddev->htqp[i] остается
не инициализирован в hclgevf_knic_setup().
Таким образом, этот патч выделяет hdev->htqp и kinfo->tqp с помощью hdev->num_tqps,
обеспечение согласованности длин hdev->htqp и kinfo->tqp
и что все элементы правильно инициализированы.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: hns3: using the num_tqps in the vf driver to apply for resources Currently, hdev->htqp is allocated using hdev->num_tqps, and kinfo->tqp is allocated using kinfo->num_tqps. However, kinfo->num_tqps is set to min(new_tqps, hdev->num_tqps); Therefore, kinfo->num_tqps may be smaller than hdev->num_tqps, which causes some hdev->htqp[i] to remain uninitialized in hclgevf_knic_setup(). Thus, this patch allocates hdev->htqp and kinfo->tqp using hdev->num_tqps, ensuring that the lengths of hdev->htqp and kinfo->tqp are consistent and that all elements are properly initialized.