🇰🇷 한글 설명
Linux 커널의 netem 모듈에서 패킷 복제 시 반환 값이 잘못 처리되어 Use-After-Free 취약점이 발생합니다. 패킷이 실제로 큐에 들어가지 않았음에도 성공으로 반환되어 큐의 길이를 잘못 계산하게 되며, 이로 인해 DRR과 같은 특정 qdisc에서 dangling pointer가 남을 수 있습니다.
💡 쉬운 설명
네트워크 패킷을 복제하는 과정에서 시스템이 실제로는 패킷을 저장하지 못했음에도 성공했다고 착각하는 오류가 있습니다. 이로 인해 메모리 관리 정보가 꼬이게 되어 시스템이 불안정해지거나 해킹에 이용될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
netem: fix return value if duplicate enqueue fails
There is a bug in netem_enqueue() introduced by
commit 5845f706388a ("net: netem: fix skb length BUG_ON in __skb_to_sgvec")
that can lead to a use-after-free.
This commit made netem_enqueue() always return NET_XMIT_SUCCESS
when a packet is duplicated, which can cause the parent qdisc's q.qlen
to be mistakenly incremented. When this happens qlen_notify() may be
skipped on the parent during destruction, leaving a dangling pointer
for some classful qdiscs like DRR.
There are two ways for the bug happen:
- If the duplicated packet is dropped by rootq->enqueue() and then
the original packet is also dropped.
- If rootq->enqueue() sends the duplicated packet to a different qdisc
and the original packet is dropped.
In both cases NET_XMIT_SUCCESS is returned even though no packets
are enqueued at the netem qdisc.
The fix is to defer the enqueue of the duplicate packet until after
the original packet has been guaranteed to return NET_XMIT_SUCCESS.
📍 영향받는 시스템
Linux Kernel (netem 모듈을 사용하는 시스템)
⚔️ 공격 벡터
특정 네트워크 트래픽 조건(패킷 복제 및 드롭 발생)을 유도하여 메모리 오류 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 취약점이 수정된 최신 버전인지 확인