🇰🇷 한글 설명
Linux 커널의 IGMP 구현에서 발생한 교착 상태(Deadlock) 취약점입니다. 특정 상황에서 동일한 CPU가 이미 보유한 락을 다시 획득하려 시도하여 시스템이 멈출 수 있으며, 이를 해결하기 위해 ip_sf_list 구조체를 RCU 방식으로 전환하였습니다.
💡 쉬운 설명
컴퓨터가 데이터를 처리하는 과정에서 서로 자물쇠(Lock)를 잠그려다 서로를 기다리며 멈춰버리는 현상이 발생할 수 있는 문제입니다. 이 문제는 데이터 처리 방식을 더 효율적이고 안전한 방식으로 변경하여 해결되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
igmp: convert struct ip_sf_list to RCU
Commit 23d2b94043ca ("igmp: Add ip_mc_list lock in ip_check_mc_rcu")
added spin_lock_bh(&im->lock) to ip_check_mc_rcu() to prevent a
use-after-free while iterating im->sources during concurrent deletions.
However, ip_check_mc_rcu() is called from RCU read-side critical
sections in packet receive and route lookup fast paths (e.g.
__mkroute_output(), ip_route_input_rcu(), and __udp4_lib_rcv()).
When igmpv3_send_cr() or igmpv3_send_report() holds &pmc->lock and
calls add_grec() -> igmpv3_newpack() -> ip_route_output_ports(),
an XFRM policy matching a multicast destination triggers
xfrm_tmpl_resolve_one() -> xfrm4_get_saddr() -> __mkroute_output() ->
ip_check_mc_rcu(). This attempts to acquire &im->lock while &pmc->lock
is already held on the same CPU, triggering a lockdep recursive locking
warning / deadlock.
Fix this by converting IPv4 struct ip_sf_list to RCU, mirroring the
IPv6 implementation in net/ipv6/mcast.c:
1. Add struct rcu_head to struct ip_sf_list and annotate sf_next,
sources, and tomb as __rcu pointers.
2. Use rcu_assign_pointer() and kfree_rcu() for list updates and
deletions.
3. Remove spin_lock_bh(&im->lock) from ip_check_mc_rcu() and traverse
im->sources locklessly with for_each_psf_rcu(), reading and writing
counter fields with READ_ONCE() and WRITE_ONCE().
Note: RCU conversion of /proc/net/mcfilter will be done in a
separate patch.
📍 영향받는 시스템
Linux Kernel (IGMP 관련 모듈 사용 시스템)
⚔️ 공격 벡터
멀티캐스트 패킷 수신 및 XFRM 정책 매칭을 유도하여 특정 네트워크 경로를 통해 교착 상태를 유발할 수 있음
🛡️ 대응 방법
해당 패치가 적용된 최신 버전의 Linux 커널로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 패치가 포함된 배포판의 수정 버전인지 확인하십시오.