🇰🇷 한글 설명
Linux 커널의 netdevsim 모듈에서 큐 리셋 시 NAPI 구조체와의 연결을 적절히 업데이트하지 않아 발생하는 취약점입니다. 이로 인해 기존에 사용되던 NAPI 구조체가 해제된 후에도 참조가 남아 있어, Netlink를 통한 큐 덤프 요청 시 KASAN slab-use-after-free 오류가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 시뮬레이션 도구에서 데이터 처리 통로를 초기화할 때, 예전 통로 정보를 제대로 지우지 않아 발생하는 문제입니다. 이로 인해 시스템이 이미 사라진 정보를 읽으려다 오류를 일으키며 멈출 수 있습니다.
🇺🇸 원문 (English)
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.
📍 영향받는 시스템
Linux kernel (netdevsim 모듈 사용 환경)
⚔️ 공격 벡터
Netlink 인터페이스를 통한 NETDEV_CMD_QUEUE_GET 명령 실행 (로컬 권한 필요)
🛡️ 대응 방법
netif_queue_set_napi()를 호출하여 새로운 NAPI를 연결하고, 해제 시 NULL로 설정하도록 커널 패치 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전인지 배포판 보안 공지를 통해 확인하십시오.