🇰🇷 한글 설명
Linux 커널의 TIPC 프로토콜에서 UDP 베어러의 복제 리스트를 업데이트할 때 동기화 메커니즘이 부족하여 발생하는 레이스 컨디션 취약점입니다. 권한이 없는 사용자 네임스페이스에서도 베어러를 활성화할 수 있어, 리스트 조작을 통해 커널 버그를 유발하거나 메모리 손상을 일으킬 수 있습니다.
💡 쉬운 설명
컴퓨터의 핵심 운영체제(커널) 내에서 데이터를 정리하는 과정 중 두 작업이 동시에 충돌하여 데이터가 엉키는 문제입니다. 이를 통해 시스템이 멈추거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
tipc: serialize udp bearer replicast list updates
tipc_udp_rcast_add() and cleanup_bearer() both update ub->rcast.list with
list_add_rcu() / list_del_rcu(), but nothing serializes them. The add runs
from the encap receive softirq (via tipc_udp_rcast_disc()) without
rtnl_lock(), so it can race the cleanup delete and corrupt the list:
list_del corruption. prev->next should be ffff8880298d7ab8,
but was ffff88802449ad38. (prev=ffff888027e3ec98)
kernel BUG at lib/list_debug.c:62!
RIP: __list_del_entry_valid_or_report+0x17a/0x200
Workqueue: events cleanup_bearer
Call Trace:
cleanup_bearer (net/tipc/udp_media.c:811)
process_one_work (kernel/workqueue.c:3302)
worker_thread (kernel/workqueue.c:3466)
The bearer can be enabled from an unprivileged user namespace, as the
TIPCv2 generic-netlink ops carry no GENL_ADMIN_PERM.
Add a spinlock to struct udp_bearer and take it around the list_add_rcu()
in tipc_udp_rcast_add() and the list_del_rcu() loop in cleanup_bearer() so
the two writers can no longer corrupt the list.
Reject a duplicate peer under the same lock before allocating, and remove
tipc_udp_is_known_peer(). The old lockless pre-check in
tipc_udp_rcast_disc() was racy: two softirqs discovering the same peer
could both find it absent and add it twice.
cleanup_bearer() runs from a workqueue after tipc_udp_disable() clears the
bearer's up bit, so an encap softirq can still reach tipc_udp_rcast_add()
and add a peer after cleanup_bearer() has already emptied the list, leaking
that entry when the bearer is freed. Mark the bearer disabled under
rcast_lock once the list is emptied and refuse further additions.
📍 영향받는 시스템
Linux kernel (TIPC module enabled)
⚔️ 공격 벡터
비특권 사용자 네임스페이스를 통한 TIPC 베어러 활성화 및 레이스 컨디션 유도
🛡️ 대응 방법
커널 패치를 통해 udp_bearer 구조체에 스핀락(spinlock)을 추가하여 리스트 업데이트를 직렬화해야 합니다.
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 확인합니다.