🇰🇷 한글 설명
리눅스 커널의 Open vSwitch에서 터널 포트 해제 시 RCU 문맥과 RTNL 잠금 간의 상호 대기 상태로 인해 자기 교착상태(self-deadlock)가 발생하는 취약점입니다. 기존 코드는 rtnl_unlock() 호출 전에 RCU 콜백을 예약하지 않아 참조가 해제되지 않고 시스템이 멈추는 원인이 됩니다.
💡 쉬운 설명
네트워크 터널 장치를 제거할 때 시스템이 서로를 기다리며 멈추는 오류가 있습니다. 이 결함을 수정하여 장치가 정상적으로 삭제되고 시스템이 안정적으로 동작하도록 개선되었습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
openvswitch: vport: fix self-deadlock on release of tunnel ports
vports are used concurrently and protected by RCU, so netdev_put()
must happen after the RCU grace period. So, either in an RCU call or
after the synchronize_net(). The rtnl_delete_link() must happen under
RTNL and so can't be executed in RCU context. Calling synchronize_net()
while holding RTNL is not a good idea for performance and system
stability under load in general, so calling netdev_put() in RCU call
is the right solution here.
However,
when the device is deleted, rtnl_unlock() will call netdev_run_todo()
and block until all the references are gone. In the current code this
means that we never reach the call_rcu() and the vport is never freed
and the reference is never released, causing a self-deadlock on device
removal.
Fix that by moving the rcu_call() before the rtnl_unlock(), so the
scheduled RCU callback will be executed when synchronize_net() is
called from the rtnl_unlock()->netdev_run_todo() while the RTNL itself
is already released.
📍 영향받는 시스템
Linux kernel (Open vSwitch vport 구현이 포함된 모든 버전)
⚔️ 공격 벡터
로컬 권한을 가진 사용자가 터널 포트를 생성한 후 삭제하여 시스템 교착상태를 유발
🛡️ 대응 방법
벤더가 제공하는 최신 커널 패치 또는 업데이트를 적용하여 RCU 콜백 예약 순서를 수정
🔧 검증 코드
출력된 커널 버전이 패치가 적용된 최신 안정 버전인지 벤더 문서에서 확인