🇰🇷 한글 설명
Linux 커널의 CAN isotp 모듈에서 isotp_release() 함수가 RCU grace period를 기다리지 않고 소켓을 해제하여 발생하는 Use-After-Free 취약점입니다. isotp_notify()가 필터를 해제할 때 적절한 대기 시간 없이 so->bound를 초기화함으로써, 실행 중인 isotp_rcv()가 타이머를 재설정하려 할 때 이미 해제된 소켓에 접근하게 됩니다.
💡 쉬운 설명
컴퓨터의 통신 부품을 정리하는 과정에서, 아직 사용 중인 데이터가 있는데 부품을 먼저 치워버려 발생하는 오류입니다. 이로 인해 시스템이 갑자기 멈추거나 해커가 시스템 권한을 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
can: isotp: use unconditional synchronize_rcu() in isotp_release()
isotp_notify() unregisters the (RCU) CAN filters via can_rx_unregister()
and clears so->bound without waiting for a grace period. isotp_release()
uses so->bound to decide whether it needs to call synchronize_rcu()
before cancelling so->rxtimer, so when NETDEV_UNREGISTER runs first it
skips that synchronize_rcu() and can cancel the timer while an
in-flight isotp_rcv() is still executing and about to re-arm it via
isotp_send_fc(), leading to a use-after-free timer callback on the
freed socket.
sakisho-bot remarked a problem with rtnl_lock held in isotp_notify(),
therefore make isotp_release() always call synchronize_rcu() before
cancelling the timers, regardless of so->bound. This still closes the
original race (isotp_notify() clearing so->bound without waiting for
in-flight isotp_rcv() callers before isotp_release() cancels the RX
timer) without adding any RCU wait to the netdevice notifier path.
📍 영향받는 시스템
Linux Kernel (CAN isotp 모듈을 사용하는 시스템)
⚔️ 공격 벡터
특수하게 조작된 CAN 메시지를 전송하여 타이머 콜백과 소켓 해제 간의 경쟁 상태(Race Condition) 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 isotp_release()에서 항상 synchronize_rcu()를 호출하도록 수정
🔧 검증 코드
출력된 커널 버전을 확인하여 해당 취약점이 해결된 패치 버전인지 보안 공지(Security Advisory)와 대조