В ядре Linux устранена следующая уязвимость:
Ice: Ice_adapter: освободить запись xa при ошибке выделения адаптера
При сбое Ice_adapter_new() зарезервированная запись XArray, созданная
xa_insert() не выпущен. Это приводит к последующим вставкам в
тот же индекс для возврата -EBUSY, что потенциально может привести к
Разыменование NULL-указателя. Измените порядок операций, как предложил Пшемек Китзель:
1.
Проверьте, существует ли адаптер (xa_load)
2. Зарезервируйте слот XArray (xa_reserve).
3. Выделите адаптер (ice_adapter_new)
4.
Сохраните адаптер (xa_store)
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: ice: ice_adapter: release xa entry on adapter allocation failure When ice_adapter_new() fails, the reserved XArray entry created by xa_insert() is not released. This causes subsequent insertions at the same index to return -EBUSY, potentially leading to NULL pointer dereferences. Reorder the operations as suggested by Przemek Kitszel: 1. Check if adapter already exists (xa_load) 2. Reserve the XArray slot (xa_reserve) 3. Allocate the adapter (ice_adapter_new) 4. Store the adapter (xa_store)