🇰🇷 한글 설명
리눅스 커널의 inetpeer 시스템에서 RB-트리 노드 비교 방식이 결정론적이라 공격자가 트리의 구조를 예측할 수 있는 취약점입니다. 공격자는 이를 통해 특정 노드를 강제로 제거하여 ICMP 속도 제한을 우회하고 UDP 포트 개방 여부를 알아내는 사이드 채널 공격이 가능합니다. 이를 해결하기 위해 SipHash를 사용하여 트리의 노드 순서를 무작위화하는 패치가 적용되었습니다.
💡 쉬운 설명
해커가 컴퓨터 내부의 데이터 정리 규칙을 미리 알아내어 특정 정보를 지우고 다시 생성하는 방식으로 보안 규칙을 속이는 문제입니다. 이 과정에서 특정 서비스가 열려 있는지 몰래 알아낼 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
inetpeer: randomize RB-tree node comparison using SipHash
The inetpeer rate limiting system stores peer entries in a Red-Black tree
keyed deterministically on the remote IP address. Because tree lookups walk
the RB-tree using standard lexicographical comparisons (inetpeer_addr_cmp),
an off-path adversary can predict the exact topology of the tree and the
sequence of nodes traversed during lookups (the gc_stack candidate list).
By combining deterministic tree traversal with aggressive garbage collection
(triggered when tree size exceeds inet_peer_threshold), an attacker can
selectively force the eviction of targeted inet_peer nodes. When an evicted
node is subsequently re-created upon receiving a new packet, its rate-limiting
token bucket (rate_tokens, rate_last) is reset to full capacity. This creates
a side-channel primitive allowing off-path attackers to bypass IP-keyed ICMP
rate limits and infer open UDP ports (similar to SAD DNS style attacks).
Mitigate this by randomizing the RB-tree node comparison logic using SipHash
with a secret key (inetpeer_hash_key) initialized via net_get_random_once().
Nodes are ordered in the tree by SipHash(addr, key) rather than raw IP
addresses. Because the secret key is unknown to external entities, the tree
layout and lookup traversal paths are unpredictable to off-path adversaries,
breaking the deterministic eviction gadget.
Cache the computed 64-bit SipHash (hash) in struct inet_peer and compute the
target hash (dhash) once at the beginning of inet_getpeer() to avoid recomputing
SipHash at every step of the RB-tree walk.
📍 영향받는 시스템
Linux Kernel (inetpeer 관련 모듈을 사용하는 모든 버전)
⚔️ 공격 벡터
오프패스(Off-path) 공격자가 트리의 결정론적 구조를 이용해 특정 노드를 강제 제거(Eviction)한 후 속도 제한을 우회하는 방식
🛡️ 대응 방법
SipHash와 비밀 키를 사용하여 RB-트리의 노드 비교 로직을 무작위화하는 커널 업데이트 적용
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 패치된 최신 보안 업데이트 버전인지 확인하십시오.