🇰🇷 한글 설명
Linux 커널의 i40e 드라이버에서 MSI-X 인터럽트 요청 중 오류가 발생할 경우, 이미 할당된 인터럽트를 해제하는 과정에서 잘못된 dev_id를 사용하여 인터럽트가 정상적으로 해제되지 않는 취약점입니다. 이로 인해 잘못된 인터럽트 해제 시도가 발생하며 커널 경고 및 시스템 불안정을 초래할 수 있습니다.
💡 쉬운 설명
네트워크 카드가 작동을 준비하다가 오류가 났을 때, 이전에 사용하던 자원을 정리하는 과정에서 실수로 잘못된 정보를 사용하여 시스템에 혼란을 주는 문제입니다. 이로 인해 시스템이 경고를 내보내거나 불안정해질 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
i40e: fix IRQ freeing in i40e_vsi_request_irq_msix error path
If request_irq() in i40e_vsi_request_irq_msix() fails in an iteration
later than the first, the error path wants to free the IRQs requested
so far. However, it uses the wrong dev_id argument for free_irq(), so
it does not free the IRQs correctly and instead triggers the warning:
Trying to free already-free IRQ 173
WARNING: CPU: 25 PID: 1091 at kernel/irq/manage.c:1829 __free_irq+0x192/0x2c0
Modules linked in: i40e(+) [...]
CPU: 25 UID: 0 PID: 1091 Comm: NetworkManager Not tainted 6.17.0-rc1+ #1 PREEMPT(lazy)
Hardware name: [...]
RIP: 0010:__free_irq+0x192/0x2c0
[...]
Call Trace:
<TASK>
free_irq+0x32/0x70
i40e_vsi_request_irq_msix.cold+0x63/0x8b [i40e]
i40e_vsi_request_irq+0x79/0x80 [i40e]
i40e_vsi_open+0x21f/0x2f0 [i40e]
i40e_open+0x63/0x130 [i40e]
__dev_open+0xfc/0x210
__dev_change_flags+0x1fc/0x240
netif_change_flags+0x27/0x70
do_setlink.isra.0+0x341/0xc70
rtnl_newlink+0x468/0x860
rtnetlink_rcv_msg+0x375/0x450
netlink_rcv_skb+0x5c/0x110
netlink_unicast+0x288/0x3c0
netlink_sendmsg+0x20d/0x430
____sys_sendmsg+0x3a2/0x3d0
___sys_sendmsg+0x99/0xe0
__sys_sendmsg+0x8a/0xf0
do_syscall_64+0x82/0x2c0
entry_SYSCALL_64_after_hwframe+0x76/0x7e
[...]
</TASK>
---[ end trace 0000000000000000 ]---
Use the same dev_id for free_irq() as for request_irq().
I tested this with inserting code to fail intentionally.
📍 영향받는 시스템
i40e 드라이버를 사용하는 Linux 커널 시스템
⚔️ 공격 벡터
로컬 공격자가 네트워크 인터페이스 설정을 변경하여 인터럽트 요청 오류를 유도함으로써 발생 가능
🛡️ 대응 방법
i40e 드라이버의 인터럽트 해제 로직이 수정된 최신 Linux 커널로 업데이트
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.