🇰🇷 한글 설명
Linux 커널의 ibmvnic 드라이버에서 VIOS로 데이터를 전송한 후 skb(socket buffer)를 참조할 때 발생하는 Use-After-Free 취약점입니다. 데이터 전송 후 VIOS가 인터럽트를 발생시켜 메모리를 해제할 수 있는데, 그 직후 통계 업데이트를 위해 메모리에 접근하려 할 때 레이스 컨디션이 발생하여 시스템 오류를 유발할 수 있습니다.
💡 쉬운 설명
네트워크 데이터를 보낸 직후, 컴퓨터가 이미 사용이 끝난 메모리 영역을 다시 읽으려고 시도하면서 발생하는 오류입니다. 이 과정에서 메모리 충돌이 일어나 시스템이 멈추거나 예상치 못한 동작을 할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ibmvnic: Don't reference skb after sending to VIOS
Previously, after successfully flushing the xmit buffer to VIOS,
the tx_bytes stat was incremented by the length of the skb.
It is invalid to access the skb memory after sending the buffer to
the VIOS because, at any point after sending, the VIOS can trigger
an interrupt to free this memory. A race between reading skb->len
and freeing the skb is possible (especially during LPM) and will
result in use-after-free:
==================================================================
BUG: KASAN: slab-use-after-free in ibmvnic_xmit+0x75c/0x1808 [ibmvnic]
Read of size 4 at addr c00000024eb48a70 by task hxecom/14495
<...>
Call Trace:
[c000000118f66cf0] [c0000000018cba6c] dump_stack_lvl+0x84/0xe8 (unreliable)
[c000000118f66d20] [c0000000006f0080] print_report+0x1a8/0x7f0
[c000000118f66df0] [c0000000006f08f0] kasan_report+0x128/0x1f8
[c000000118f66f00] [c0000000006f2868] __asan_load4+0xac/0xe0
[c000000118f66f20] [c0080000046eac84] ibmvnic_xmit+0x75c/0x1808 [ibmvnic]
[c000000118f67340] [c0000000014be168] dev_hard_start_xmit+0x150/0x358
<...>
Freed by task 0:
kasan_save_stack+0x34/0x68
kasan_save_track+0x2c/0x50
kasan_save_free_info+0x64/0x108
__kasan_mempool_poison_object+0x148/0x2d4
napi_skb_cache_put+0x5c/0x194
net_tx_action+0x154/0x5b8
handle_softirqs+0x20c/0x60c
do_softirq_own_stack+0x6c/0x88
<...>
The buggy address belongs to the object at c00000024eb48a00 which
belongs to the cache skbuff_head_cache of size 224
==================================================================
📍 영향받는 시스템
Linux kernel (ibmvnic driver 사용 시스템)
⚔️ 공격 벡터
특정 네트워크 트래픽 패턴을 유도하여 메모리 해제와 데이터 참조 사이의 레이스 컨디션을 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인