🇰🇷 한글 설명
Linux 커널의 mt76 Wi-Fi 드라이버에서 드라이버 제거 시 tx NAPI 인스턴스를 비활성화하지 않고 삭제하여 경고가 발생하는 문제가 해결되었습니다. 이 수정은 mt76_dma_cleanup()에서 NAPI를 먼저 비활성화하도록 변경합니다.
💡 쉬운 설명
무선랜 드라이버를 제거할 때 내부 네트워크 처리 기능을 제대로 끄지 않아 커널 경고가 발생하던 문제입니다. 이번 수정으로 드라이버 제거 과정이 안전하게 처리됩니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
wifi: mt76: disable napi on driver removal
A warning on driver removal started occurring after commit 9dd05df8403b
("net: warn if NAPI instance wasn't shut down"). Disable tx napi before
deleting it in mt76_dma_cleanup().
WARNING: CPU: 4 PID: 18828 at net/core/dev.c:7288 __netif_napi_del_locked+0xf0/0x100
CPU: 4 UID: 0 PID: 18828 Comm: modprobe Not tainted 6.15.0-rc4 #4 PREEMPT(lazy)
Hardware name: ASUS System Product Name/PRIME X670E-PRO WIFI, BIOS 3035 09/05/2024
RIP: 0010:__netif_napi_del_locked+0xf0/0x100
Call Trace:
<TASK>
mt76_dma_cleanup+0x54/0x2f0 [mt76]
mt7921_pci_remove+0xd5/0x190 [mt7921e]
pci_device_remove+0x47/0xc0
device_release_driver_internal+0x19e/0x200
driver_detach+0x48/0x90
bus_remove_driver+0x6d/0xf0
pci_unregister_driver+0x2e/0xb0
__do_sys_delete_module.isra.0+0x197/0x2e0
do_syscall_64+0x7b/0x160
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Tested with mt7921e but the same pattern can be actually applied to other
mt76 drivers calling mt76_dma_cleanup() during removal. Tx napi is enabled
in their *_dma_init() functions and only toggled off and on again inside
their suspend/resume/reset paths. So it should be okay to disable tx
napi in such a generic way.
Found by Linux Verification Center (linuxtesting.org).
📍 영향받는 시스템
mt76 기반 무선랜 드라이버(예: MediaTek mt7921e)를 사용하는 Linux 커널 6.15-rc4 이후 버전
⚔️ 공격 벡터
로컬 사용자가 드라이버 모듈을 제거하는 상황에서 커널 경고가 발생하는 것으로, 원격 공격 경로는 확인되지 않음
🛡️ 대응 방법
패치가 포함된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
커널 버전이 패치된 버전 이상인지 배포판 보안 공지와 대조하고, mt76 모듈이 로드되지 않았다면 해당 경고 영향이 없음
uname -r && (lsmod | grep -E 'mt76|mt7921' || echo 'mt76 모듈 미로드')