В ядре Linux устранена следующая уязвимость: netdevsim: обновление очереди NAPI ассоциации при сбросе очереди В netdevsim получают очереди (struct nsim_rq) встраивают собственную структуру napi_struct. Когда выполняется сброс очереди (например, через queue_reset debugfs), nsim_queue_start() обменивается в недавно выделенной структуре nsim_rq, а nsim_queue_mem_free() позже удаляет и освобождает старую. Однако nsim_queue_start() не смог обновить отображение очереди в NAPI через netif_queue_set_napi().
В результате dev->_rx[idx].napi продолжил указывать на старую конструкцию NAPI. После того, как старая очередь была освобождена, последующий дамп очереди через Netlink (NETDEV_CMD_QUEUE_GET) вызвал KASAN slab-use-after-free, читаемый в nla_put_napi_id () при доступе к rxq->napi->napi_id. Исправьте это, позвонив netif_queue_set_napi() в nsim_queue_start(), чтобы связать новый NAPI с очередью RX, и очистите связь с netif_queue_set_napi(..., NULL) в nsim_del_napi() во время разбора.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: netdevsim: update queue NAPI association on queue reset In netdevsim, receive queues (struct nsim_rq) embed their own struct napi_struct. When queue reset is performed (e.g. via queue_reset debugfs), nsim_queue_start() swaps in a newly allocated struct nsim_rq, and nsim_queue_mem_free() later deletes and frees the old one. However, nsim_queue_start() failed to update the queue-to-NAPI mapping via netif_queue_set_napi(). As a result, dev->_rx[idx].napi continued to point to the old NAPI struct. After the old queue was freed, a subsequent queue dump via Netlink (NETDEV_CMD_QUEUE_GET) triggered a KASAN slab-use-after-free read in nla_put_napi_id() when accessing rxq->napi->napi_id. Fix this by calling netif_queue_set_napi() in nsim_queue_start() to associate the new NAPI with the RX queue, and clear the association with netif_queue_set_napi(..., NULL) in nsim_del_napi() during teardown.