🇰🇷 한글 설명
Linux 커널의 ixgbe 드라이버에서 ixgbe_remove() 함수 호출 시 devlink_free()가 너무 일찍 호출되어 발생하는 Use-After-Free(UAF) 취약점입니다. ixgbe_adapter가 devlink에 포함되어 있어, 메모리가 해제된 후에도 해당 메모리에 접근을 시도할 경우 시스템 오류나 보안 문제가 발생할 수 있습니다.
💡 쉬운 설명
네트워크 카드를 제거하는 과정에서 컴퓨터가 이미 사용이 끝났다고 판단해 버린 메모리 공간을 다시 사용하려고 시도하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ixgbe: fix too early devlink_free() in ixgbe_remove()
Since ixgbe_adapter is embedded in devlink, calling devlink_free()
prematurely in the ixgbe_remove() path can lead to UAF. Move devlink_free()
to the end.
KASAN report:
BUG: KASAN: use-after-free in ixgbe_reset_interrupt_capability+0x140/0x180 [ixgbe]
Read of size 8 at addr ffff0000adf813e0 by task bash/2095
CPU: 1 UID: 0 PID: 2095 Comm: bash Tainted: G S 6.17.0-rc2-tnguy.net-queue+ #1 PREEMPT(full)
[...]
Call trace:
show_stack+0x30/0x90 (C)
dump_stack_lvl+0x9c/0xd0
print_address_description.constprop.0+0x90/0x310
print_report+0x104/0x1f0
kasan_report+0x88/0x180
__asan_report_load8_noabort+0x20/0x30
ixgbe_reset_interrupt_capability+0x140/0x180 [ixgbe]
ixgbe_clear_interrupt_scheme+0xf8/0x130 [ixgbe]
ixgbe_remove+0x2d0/0x8c0 [ixgbe]
pci_device_remove+0xa0/0x220
device_remove+0xb8/0x170
device_release_driver_internal+0x318/0x490
device_driver_detach+0x40/0x68
unbind_store+0xec/0x118
drv_attr_store+0x64/0xb8
sysfs_kf_write+0xcc/0x138
kernfs_fop_write_iter+0x294/0x440
new_sync_write+0x1fc/0x588
vfs_write+0x480/0x6a0
ksys_write+0xf0/0x1e0
__arm64_sys_write+0x70/0xc0
invoke_syscall.constprop.0+0xcc/0x280
el0_svc_common.constprop.0+0xa8/0x248
do_el0_svc+0x44/0x68
el0_svc+0x54/0x160
el0t_64_sync_handler+0xa0/0xe8
el0t_64_sync+0x1b0/0x1b8
📍 영향받는 시스템
Linux kernel (ixgbe driver 사용 시스템, KASAN 리포트 기준 6.17.0-rc2 포함)
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 sysfs를 통해 드라이버를 언바인드(unbind)하거나 장치를 제거하는 동작을 유도하여 발생
🛡️ 대응 방법
ixgbe 드라이버의 devlink_free() 호출 시점을 ixgbe_remove() 함수의 마지막 단계로 이동시킨 최신 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.