В ядре Linux устранена следующая уязвимость: net: page_pool: fix use-after-free in page_pool_recycle_ring_bulk() With CONFIG_PAGE_POOL_STATS=y, page_pool_recycle_ring_bulk() обновляет статистику рециркуляции после удаления блокировки производителя. Если он только что переработал последние летные метки уничтожаемого бассейна, page_pool_release() может пройти свой барьер блокировки производителя и освободить бассейн до запуска recycle_stat_add(). Commit fcc680a647ba7 ("page_pool: allow mixing PPs in the one bulk») перенесли это обновление статистики после разблокировки.
Commit 271683bb2cf32 ("page_pool: Fix use-after-free in page_pool_recycle_in_ring") позже добавил барьер, но только исправил page_pool_recycle_in_ring(). Перенесите обновление обратно под замок.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: page_pool: fix use-after-free in page_pool_recycle_ring_bulk() With CONFIG_PAGE_POOL_STATS=y, page_pool_recycle_ring_bulk() updates the recycle stats after dropping the producer lock. If it just recycled the last inflight netmems of a pool being destroyed, page_pool_release() can pass its producer-lock barrier and free the pool before recycle_stat_add() runs. Commit fcc680a647ba7 ("page_pool: allow mixing PPs within one bulk") moved this stat update after the unlock. Commit 271683bb2cf32 ("page_pool: Fix use-after-free in page_pool_recycle_in_ring") later added the barrier, but only fixed page_pool_recycle_in_ring(). Move the update back under the lock.