В ядре Linux была устранена следующая уязвимость: tcp: reject net_iov in zerocopy receive mapping hinds После копирования читаемого префикса, receive_fallback_to_copy() запрашивает tcp_zerocopy_set_hint_for_skb(), где может возобновиться отображение страниц. Если следующий skb нечитаем, find_next_mappable_frag() передает свой фрагмент net_iov can_map_frag(). skb_frag_page() возвращает NULL для net_iov, но can_map_frag() переводит его в PageCompound(). Запуск v7.2 KASAN на подключенном сокете TCP с 64 читаемыми байтами, за которым следует 4096-байтный фрагмент NET_IOV_DMABUF, сообщает: BUG: KASAN: null-ptr-deref in can_map_frag tcp_zerocopy_receive -> can_map_frag Kernel panic - not syncing: KASAN: panic_on_warn set Диагностика вставлена net_iov напрямую, потому что у тестируемого хоста нет devmem-способа NIC.
Достижимость оборудования end-to-end остается непроверенной и требует CONFIG_NET_DEVMEM плюс поддерживаемую очередь DMA-buf-bound RX. Отклонить все фрагменты net_iov перед skb_frag_page(). Он охватывает оба типа DMABUF и IOURING net_iov, оставляя проверки без изменений.
С помощью охранника та же очередь скопировала читаемый префикс, вернула подсказку 4096-байтового пропуска и завершила без сбоя.
Показать оригинальное описание (EN)
In the Linux kernel, the following vulnerability has been resolved: tcp: reject net_iov in zerocopy receive mapping hints After copying a readable prefix, receive_fallback_to_copy() asks tcp_zerocopy_set_hint_for_skb() where page mapping can resume. If the next skb is unreadable, find_next_mappable_frag() passes its net_iov fragment to can_map_frag(). skb_frag_page() returns NULL for a net_iov, but can_map_frag() dereferences it in PageCompound(). A v7.2 KASAN run on a connected TCP socket with 64 readable bytes followed by a 4096-byte NET_IOV_DMABUF fragment reported: BUG: KASAN: null-ptr-deref in can_map_frag tcp_zerocopy_receive -> can_map_frag Kernel panic - not syncing: KASAN: panic_on_warn set The diagnostic inserted the net_iov directly because the test host has no devmem-capable NIC. Hardware end-to-end reachability remains untested and requires CONFIG_NET_DEVMEM plus a supported DMA-buf-bound RX queue. Reject all net_iov fragments before skb_frag_page(). This covers both DMABUF and IOURING net_iov types while leaving page-backed checks unchanged. With the guard, the same queue copied the readable prefix, returned a 4096-byte skip hint, and completed without a fault.