🇰🇷 한글 설명
Linux 커널의 xfrm 구성 요소에서 번들 생성 시 net_device 참조를 RCU 하에서 적절히 유지하지 않아 발생하는 Use-After-Free 취약점입니다. RTM_DELLINK 작업이 동시에 발생하여 장치가 해제될 경우, xfrm6_fill_dst 함수가 이미 해제된 메모리 주소를 참조하게 되어 시스템 오류나 보안 위협을 초래할 수 있습니다.
💡 쉬운 설명
네트워크 장치가 사용 중인데 갑자기 삭제되어, 컴퓨터가 이미 사라진 장치를 계속 사용하려고 시도하다가 발생하는 오류입니다. 이로 인해 시스템이 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xfrm: hold net_device reference under RCU in bundle creation
xfrm_bundle_create() and xfrm_create_dummy_bundle() read dst->dev into
a local pointer without taking a device reference, then pass it to
xfrm_fill_dst(). A concurrent RTM_DELLINK replaces dst->dev via
dst_dev_put() and frees the old net_device, causing a use-after-free
when xfrm6_fill_dst() later dereferences the stale dev pointer.
BUG: KASAN: slab-use-after-free in xfrm6_fill_dst+0x82c/0x860
(net/ipv6/xfrm6_policy.c:86 netdev_hold())
Read of size 8 at addr ffff8880142fe588 by task exploit/153
Call Trace:
xfrm6_fill_dst+0x82c/0x860
xfrm_resolve_and_create_bundle+0x21d4/0x2bd0
xfrm_lookup_with_ifid+0x485/0x1640
ip6_dst_lookup_flow+0x19b/0x1e0
udpv6_sendmsg+0x1443/0x2dd0
Fix this by reading dst->dev via dst_dev_rcu() and keeping the RCU
read-side critical section active until xfrm_fill_dst() has taken the
required device references.
📍 영향받는 시스템
Linux Kernel (xfrm 모듈 사용 환경)
⚔️ 공격 벡터
네트워크 인터페이스 삭제(RTM_DELLINK)와 xfrm 번들 생성 과정을 동시에 수행하는 레이스 컨디션 공격
🛡️ 대응 방법
dst_dev_rcu()를 사용하여 RCU 읽기 임계 구역 내에서 장치 참조를 안전하게 유지하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.