🇰🇷 한글 설명
Linux 커널의 batman-adv 모듈에서 RTNL 잠금이 이미 보유된 상태에서 batadv_v_elp_get_throughput()이 호출될 때 이중 잠금으로 인한 교착 상태가 발생할 수 있습니다. cancel_delayed_work_sync()를 통해 작업이 취소될 때 rtnl_trylock()과 lockless 버전의 __batadv_get_real_netdev()를 사용하여 해결됩니다.
💡 쉬운 설명
Linux 커널의 망 관리 코드에서 두 개의 작업이 동시에 같은 자원의 잠금을 기다리면서 시스템이 응답하지 않을 수 있는 문제입니다. 특정 네트워크 장치 설정 해제 시 발생하는 교착 상태 현상입니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
batman-adv: Avoid double-rtnl_lock ELP metric worker
batadv_v_elp_get_throughput() might be called when the RTNL lock is already
held. This could be problematic when the work queue item is cancelled via
cancel_delayed_work_sync() in batadv_v_elp_iface_disable(). In this case,
an rtnl_lock() would cause a deadlock.
To avoid this, rtnl_trylock() was used in this function to skip the
retrieval of the ethtool information in case the RTNL lock was already
held.
But for cfg80211 interfaces, batadv_get_real_netdev() was called - which
also uses rtnl_lock(). The approach for __ethtool_get_link_ksettings() must
also be used instead and the lockless version __batadv_get_real_netdev()
has to be called.
📍 영향받는 시스템
batman-adv 모듈이 포함된 Linux 커널 (모든 배포판의 영향받는 커널 버전)
⚔️ 공격 벡터
Local user가 batman-adv 네트워크 인터페이스 비활성화 시 시스템 교착 상태 유발 가능
🛡️ 대응 방법
Linux 커널을 CVE 수정이 포함된 최신 버전으로 업데이트
🔧 검증 코드
현재 커널 버전과 batman-adv 코드에서 rtnl_trylock() 사용 여부 확인 후, 'patched'면 취약점 수정됨, 'vulnerable'이면 업데이트 필요
uname -r && grep -r 'batadv_v_elp_get_throughput' /lib/modules/$(uname -r)/kernel/net/ 2>/dev/null | grep -q 'rtnl_trylock' && echo 'patched' || echo 'vulnerable'