In the Linux kernel, the following vulnerability has been resolved: nfp: hold IPsec RX state under the XArray lock nfp_net_ipsec_rx() drops the XArray lock before taking a reference to the xfrm_state it found. Путь удаления может стереть запись и удалить последнюю ссылку на состояние в этом интервале. RX может затем попытаться увеличить нулевой пересчет после того, как состояние было поставлено в очередь на уничтожение.
Драйвер асинхронно ставит в очередь отключение прошивки; путь удаления не дожидается завершения команды или слива в ожидании обработки RX. Сборщик мусора XFRM ждет льготного периода RCU, прежде чем освободить государство. Это задерживает иск, но не делает получение ссылки с нуля действительным.
Возьмите ссылку xfrm_state перед выпуском блокировки XArray, чтобы xa_erase () не мог работать между поиском и получением ссылки.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: nfp: hold IPsec RX state under the XArray lock nfp_net_ipsec_rx() drops the XArray lock before taking a reference to the xfrm_state it found. The delete path can erase the entry and drop the last state reference in that interval. RX can then try to increment a zero refcount after the state has been queued for destruction. The driver queues firmware invalidation asynchronously; the delete path does not wait for the command to complete or drain pending RX processing. The XFRM garbage collector waits for an RCU grace period before freeing the state. That delays reclamation but does not make acquiring a reference from zero valid. Take the xfrm_state reference before releasing the XArray lock so xa_erase() cannot run between lookup and reference acquisition.