🇰🇷 한글 설명
Linux 커널의 xfrm 구성 요소에서 NAT keepalive 작업 중 락 인버전(Lock Inversion)이 발생하여 데드락(Deadlock)이 유발될 수 있는 취약점입니다. NAT keepalive 워커가 상태 테이블을 순회하는 과정에서 특정 락을 획득하는 순서가 삭제 경로와 충돌하여 시스템이 멈출 수 있습니다.
💡 쉬운 설명
컴퓨터의 네트워크 관리 기능이 서로 다른 순서로 자원을 점유하려고 시도하다가 서로를 기다리며 멈춰버리는 현상입니다. 이로 인해 시스템이 응답하지 않는 상태가 될 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
xfrm: avoid lock inversion in nat keepalive work
nat_keepalive_work() walks the state table while xfrm_state_walk()
holds net->xfrm.xfrm_state_lock. Its callback then acquires x->lock,
which conflicts with the delete path taking the same locks in reverse
order via xfrm_state_delete() and __xfrm_state_delete(). This creates
an AB-BA deadlock that is reported by lockdep when a NAT keepalive
worker races with SA deletion.
Fix this by splitting the keepalive walk into two phases. First,
collect the candidate states while the walk holds xfrm_state_lock and
take a reference on each state. Then, after the walk completes, process
each collected state and acquire x->lock without nesting it under
xfrm_state_lock.
📍 영향받는 시스템
Linux Kernel (xfrm 모듈 사용 시스템)
⚔️ 공격 벡터
특정 네트워크 트래픽 패턴을 유도하여 NAT keepalive 작업과 SA 삭제 작업 간의 레이스 컨디션을 유발
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이상인지 확인