🇰🇷 한글 설명
Linux 커널의 net/sched 구성 요소에서 tcf_qevent_handle 함수가 TC_ACT_CONSUMED 상태를 적절히 처리하지 못해 발생하는 Use-After-Free(UAF) 취약점입니다. 파편화된 패킷을 처리하는 과정에서 소유권이 이전된 skb(socket buffer)를 RED qdisc가 계속 조작함으로써 메모리 오류를 유발할 수 있습니다.
💡 쉬운 설명
네트워크 패킷을 처리하는 과정에서 이미 다른 곳으로 넘겨준 데이터 뭉치를 시스템이 다시 건드리면서 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net/sched: cls_api: Handle TC_ACT_CONSUMED in tcf_qevent_handle
tcf_classify() can return TC_ACT_CONSUMED while the skb is held by the
defragmentation engine (e.g. act_ct on out-of-order fragments). When
that happens the skb is no longer owned by the caller and must not be
touched again.
tcf_qevent_handle() did not handle TC_ACT_CONSUMED: it fell through the
switch and returned the skb to the caller as if classification had
passed. The only qdisc that wires up qevents today is RED, via three call sites
(qe_mark on RED_PROB_MARK/HARD_MARK, qe_early_drop on congestion_drop)
red_enqueue() was continuing to operate on an skb it no longer owns in this
case -- enqueueing it, dropping it, or updating statistics. Resulting in a UAF.
tc qdisc add dev eth0 root handle 1: red ... qevent early_drop block 10
tc filter add block 10 ... action ct
(with ct defrag enabled and traffic that produces out-of-order
fragments, e.g. a fragmented UDP stream)
Handle TC_ACT_CONSUMED in tcf_qevent_handle() the same way the ingress
and egress fast paths do: treat it as stolen and return NULL without
touching the skb. Unlike the TC_ACT_STOLEN case, the skb must not be
dropped/freed here, as it is no longer owned by us.
📍 영향받는 시스템
Linux Kernel (RED qdisc 및 ct defrag 기능이 활성화된 환경)
⚔️ 공격 벡터
순서가 뒤섞인 UDP 파편화 트래픽을 전송하여 커널의 패킷 처리 로직을 유도함
🛡️ 대응 방법
해당 취약점이 수정된 최신 버전의 Linux 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 취약점이 패치된 최신 보안 업데이트 버전인지 확인하십시오.