🔍 CVE-2024-27415

8.8
CVSS Score
HIGH
2024-05-17
2026-08-04 11:17
✅ 완료

🇰🇷 한글 설명

Linux 커널의 netfilter bridge 구성에서 멀티캐스트/브로드캐스트 패킷 처리 시 conntrack 확인 로직에 레이스 컨디션(Race Condition)이 발생하는 취약점입니다. 클론된 skb가 확인되지 않은 nf_conn 엔트리를 참조하면서 발생하며, 이는 네트워크 상태 추적의 일관성을 해칠 수 있습니다.

💡 쉬운 설명

네트워크에서 여러 곳으로 동시에 보내는 패킷(멀티캐스트)을 처리할 때, 시스템이 패킷의 정보를 기록하는 과정에서 순서가 꼬여 오류가 발생할 수 있는 문제입니다. 이로 인해 네트워크 보안 규칙이 제대로 적용되지 않거나 시스템 동작이 불안정해질 수 있습니다.

🇺🇸 원문 (English)

In the Linux kernel, the following vulnerability has been resolved: netfilter: bridge: confirm multicast packets before passing them up the stack conntrack nf_confirm logic cannot handle cloned skbs referencing the same nf_conn entry, which will happen for multicast (broadcast) frames on bridges. Example: macvlan0 | br0 / \ ethX ethY ethX (or Y) receives a L2 multicast or broadcast packet containing an IP packet, flow is not yet in conntrack table. 1. skb passes through bridge and fake-ip (br_netfilter)Prerouting. -> skb->_nfct now references a unconfirmed entry 2. skb is broad/mcast packet. bridge now passes clones out on each bridge interface. 3. skb gets passed up the stack. 4. In macvlan case, macvlan driver retains clone(s) of the mcast skb and schedules a work queue to send them out on the lower devices. The clone skb->_nfct is not a copy, it is the same entry as the original skb. The macvlan rx handler then returns RX_HANDLER_PASS. 5. Normal conntrack hooks (in NF_INET_LOCAL_IN) confirm the orig skb. The Macvlan broadcast worker and normal confirm path will race. This race will not happen if step 2 already confirmed a clone. In that case later steps perform skb_clone() with skb->_nfct already confirmed (in hash table). This works fine. But such confirmation won't happen when eb/ip/nftables rules dropped the packets before they reached the nf_confirm step in postrouting. Pablo points out that nf_conntrack_bridge doesn't allow use of stateful nat, so we can safely discard the nf_conn entry and let inet call conntrack again. This doesn't work for bridge netfilter: skb could have a nat transformation. Also bridge nf prevents re-invocation of inet prerouting via 'sabotage_in' hook. Work around this problem by explicit confirmation of the entry at LOCAL_IN time, before upper layer has a chance to clone the unconfirmed entry. The downside is that this disables NAT and conntrack helpers. Alternative fix would be to add locking to all code parts that deal with unconfirmed packets, but even if that could be done in a sane way this opens up other problems, for example: -m physdev --physdev-out eth0 -j SNAT --snat-to 1.2.3.4 -m physdev --physdev-out eth1 -j SNAT --snat-to 1.2.3.5 For multicast case, only one of such conflicting mappings will be created, conntrack only handles 1:1 NAT mappings. Users should set create a setup that explicitly marks such traffic NOTRACK (conntrack bypass) to avoid this, but we cannot auto-bypass them, ruleset might have accept rules for untracked traffic already, so user-visible behaviour would change.

📍 영향받는 시스템

Linux kernel (netfilter/bridge/macvlan 관련 모듈 사용 환경)

⚔️ 공격 벡터

브리지 환경에서 macvlan 등을 통해 멀티캐스트/브로드캐스트 패킷을 전송하여 conntrack 엔트리 확인 과정의 레이스 컨디션 유도

🛡️ 대응 방법

Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.

🔧 검증 코드

출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 보안 권고 사항과 대조하십시오.

Shell / Script
uname -r

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

💻 영향받는 소프트웨어

Linux Kernel