В ядре Linux устранена следующая уязвимость: net: bcmgenet: stop Tx NAPI перед отключением очередей bcmgenet_netif_stop() и ветка Wake-on-LAN bcmgenet_suspend() как отключают очереди Tx сначала, так и останавливают Tx NAPI несколько шагов спустя. Завершение в полете вызывает netif_tx_wake_queue (), и ничто не останавливает очередь снова, поэтому передача может достичь колец после того, как они были освобождены. Закрыть безопасно, так как dev_deactivate_many() сначала останавливает qdisc. bcmgenet_suspend() этого не делает, поэтому остановите Tx NAPI перед очередями на обоих путях. KASAN на Raspberry Pi CM4, управляемый из-за изменения MTU, потому что приостановка замораживает пространство пользователя перед запуском обратного вызова: BUG: KASAN: use-after-free в bcmgenet_xmit+0x17f8/0x2258 Write размера 8 в addr ffffff8055844a68 по задаче ksoftirqd/0/14 bcmgenet_xmit+0x17f8/0x2258 dev_hard_start_xmit+0x13c/0x588 sch_direct_xmit+0x108/0x340 __dev_queue_xmit+0x1190/0x3848
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: net: bcmgenet: stop Tx NAPI before disabling the queues bcmgenet_netif_stop() and the Wake-on-LAN branch of bcmgenet_suspend() both disable the Tx queues first and stop Tx NAPI several steps later. A completion in flight calls netif_tx_wake_queue() in between, and nothing stops the queue again, so a transmit can reach the rings after they have been freed. Close is safe because dev_deactivate_many() stops the qdisc first. bcmgenet_suspend() does not, so stop Tx NAPI before the queues on both paths. KASAN on a Raspberry Pi CM4, driven from an MTU change because suspend freezes user space before the callback runs: BUG: KASAN: use-after-free in bcmgenet_xmit+0x17f8/0x2258 Write of size 8 at addr ffffff8055844a68 by task ksoftirqd/0/14 bcmgenet_xmit+0x17f8/0x2258 dev_hard_start_xmit+0x13c/0x588 sch_direct_xmit+0x108/0x340 __dev_queue_xmit+0x1190/0x3848