🇰🇷 한글 설명
Linux 커널의 TIPC 모듈에서 노드 리셋 트레이스 이벤트가 노드 락 없이 링크 정보를 순회하여, 베어러 해제 과정에서 이미 해제된 링크 포인터를 참조하는 해제 후 사용(use-after-free) 취약점이 발생합니다. 패치는 트레이스 이벤트 실행 시 노드 쓰기 락을 획득하여 덤프와 링크 삭제를 직렬화합니다.
💡 쉬운 설명
리눅스 커널의 네트워크 통신 기능(TIPC)에서 두 작업이 동시에 같은 데이터를 건드리면서 이미 삭제된 메모리를 읽는 문제입니다. 이로 인해 시스템이 비정상 종료되거나 악용될 가능성이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tipc: protect node reset trace dump with node lock
The tipc_node_reset_links trace event asks tipc_node_dump() to walk the
node's link entries. Unlike the other node events that request link data,
this event runs without the node lock.
This permits bearer teardown to free a link while the trace callback is
dumping it:
CPU 0 CPU 1
trace_tipc_node_reset_links()
tipc_node_dump()
l = n->links[0].link
tipc_node_write_lock()
kfree(l)
n->links[0].link = NULL
tipc_node_write_unlock()
tipc_link_dump(l)
tipc_link_dump() then dereferences the stale pointer. KASAN reported:
BUG: KASAN: slab-use-after-free in tipc_link_dump
Read of size 4 by task poc/115
Call Trace:
tipc_link_dump+0x10cb/0x16b0
tipc_node_dump+0x4bb/0x740
trace_event_raw_event_tipc_node_class+0x258/0x360
tipc_node_reset_links+0x14d/0x1a0
tipc_rcv+0x13f5/0x3030
tipc_udp_recv+0x4e3/0x670
Allocated by task 0:
tipc_link_create+0x1e1/0x1020
tipc_node_check_dest+0x7d2/0x11a0
tipc_disc_rcv+0xdbf/0x1430
Freed by task 89:
kfree+0x131/0x3c0
tipc_node_link_down+0x267/0x4b0
tipc_node_delete_links+0xec/0x160
bearer_disable+0x107/0x260
Take the node write lock around the trace event. This serializes the
dump against tipc_node_link_down(delete=true), which frees the link
under the same write lock.
📍 영향받는 시스템
TIPC 기능이 포함된 Linux 커널 (패치 적용 전 버전 전반)
⚔️ 공격 벡터
로컬 또는 TIPC 네트워크 트래픽을 통해 베어러 비활성화와 노드 리셋 이벤트를 경합시켜 해제된 메모리를 참조하도록 유도
🛡️ 대응 방법
커널을 취약점이 수정된 최신 버전으로 업데이트하거나 배포판의 보안 패치를 적용하고 재부팅
🔧 검증 코드
커널 버전이 패치된 버전 이상인지 확인하고, tipc 모듈이 로드되지 않았다면 해당 공격 경로가 없어 영향이 제한적이며, 로드되어 있다면 패치 적용 여부를 배포판 보안 공지로 확인
uname -r; lsmod | grep -w tipc