🇰🇷 한글 설명
Linux 커널의 MPLS 구현에서 pskb_may_pull() 호출 후 헤더 포인터를 갱신하지 않아 발생하는 Use-After-Free 취약점입니다. 비선형 데이터로 구성된 skb 처리 중 메모리가 해제된 후 기존 포인터를 참조하게 되어 시스템 불안정이나 권한 상승을 초래할 수 있습니다.
💡 쉬운 설명
데이터를 읽기 위해 메모리 공간을 확장하는 과정에서, 이전에 사용하던 메모리 주소가 무효화되었음에도 계속 사용하려고 시도하는 오류입니다. 이로 인해 컴퓨터 시스템이 갑자기 멈추거나 해커가 시스템 제어권을 얻을 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
mpls: reload header after pskb_may_pull()
mpls_select_multipath() calls mpls_multipath_hash() to choose a nexthop
when an MPLS route has multiple nexthops. While walking the MPLS label
stack, the hash routine caches hdr for the current label. After finding
the bottom-of-stack label, it calls pskb_may_pull() before reading the
inner IP header.
If an skb is constructed with the inner IP header in nonlinear data and
insufficient tailroom in the linear head, pskb_may_pull() calls
pskb_expand_head() to replace the skb head and free the old one. This
leaves hdr pointing to freed memory. The IPv6 path can invalidate hdr
again when it performs a second pull for the larger header.
The issue was found through static analysis. A reproducer sending a legal
Geneve packet through a bareudp/MPLS multipath setup triggered the same
KASAN report in 2 of 2 unpatched runs:
BUG: KASAN: slab-use-after-free in mpls_select_multipath
Read of size 1 at addr ffff88800ecc6e20 by task ksoftirqd/1/23
Call Trace:
mpls_select_multipath
mpls_forward
__netif_receive_skb_list_core
netif_receive_skb_list_internal
napi_complete_done
gro_cell_poll
__napi_poll
net_rx_action
Freed by task 23:
kfree
pskb_expand_head
__pskb_pull_tail
mpls_select_multipath
Reload hdr from the current skb head after each successful pull before
deriving the inner IPv4 or IPv6 header pointer.
📍 영향받는 시스템
MPLS 기능을 사용하는 Linux 커널 버전 (패치 전 버전)
⚔️ 공격 벡터
특수하게 조작된 Geneve 패킷을 MPLS 멀티패스 환경으로 전송하여 메모리 오류 유도
🛡️ 대응 방법
pskb_may_pull() 호출 후 skb 헤드로부터 hdr 포인터를 다시 로드하도록 커널 패치 적용
🔧 검증 코드
현재 실행 중인 커널 버전을 확인하여 해당 취약점이 해결된 최신 보안 패치 버전인지 확인합니다.