🇰🇷 한글 설명
Linux 커널의 IPv4 IGMP 구현에서 igmp_mod_timer() 및 igmp_stop_timer() 함수 호출 시 메모리 누수가 발생할 수 있는 취약점이 발견되었습니다. RCU 리더 경로에서 타이머가 삭제될 때 참조 카운트가 적절히 처리되지 않아 im 구조체가 메모리에서 해제되지 않고 남게 됩니다.
💡 쉬운 설명
네트워크 통신을 관리하는 리눅스 시스템의 특정 기능에서 사용이 끝난 메모리를 제대로 비워주지 못하는 문제가 있습니다. 이 문제가 지속되면 시스템의 메모리가 조금씩 낭비되어 성능 저하나 불안정을 초래할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
ipv4: igmp: Fix potential memory leaks in igmp_mod_timer() and igmp_stop_timer()
When a timer is deleted and not re-armed in igmp_mod_timer(), or stopped
in igmp_stop_timer(), the code currently decrements the reference counter
of the multicast list entry @im using refcount_dec(&im->refcnt).
However, both functions can be called from the RCU reader path:
- igmp_mod_timer() via igmp_heard_query() -> for_each_pmc_rcu()
- igmp_stop_timer() via igmp_rcv() -> igmp_heard_report()
If the group im was concurrently removed from the list by ip_mc_dec_group(),
its reference count might have already been decremented to 1.
In this case, timer_delete() succeeds, and refcount_dec() decrements
the refcount from 1 to 0. Since refcount_dec() does not free the object
when it hits 0 (unlike ip_ma_put()), the im structure is leaked.
Fix this by using ip_ma_put(im) instead of refcount_dec(&im->refcnt),
and deferring the put until after the spinlock is released.
📍 영향받는 시스템
Linux Kernel (IPv4 IGMP 관련 모듈 사용 시스템)
⚔️ 공격 벡터
특정 네트워크 패킷(IGMP)을 조작하여 타이머 함수를 반복적으로 호출함으로써 메모리 누수를 유도할 수 있음
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 refcount_dec 대신 ip_ma_put을 사용하도록 수정해야 함
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 수정된 패치 버전 이상인지 확인합니다.