🇰🇷 한글 설명
Linux 커널의 PSP(Platform Security Processor) 네트워크 서브시스템에서 장치 등록 해제 시 발생하는 레이스 컨디션 취약점입니다. 장치 참조를 획득한 후 락(lock)을 얻기 전 장치가 해제될 수 있어, 장치의 생존 여부를 확인하는 체크 로직이 누락되었습니다.
💡 쉬운 설명
컴퓨터 부품이 작동 중이라고 생각하고 명령을 내렸는데, 사실 그 사이에 부품이 연결 해제되어 오류가 발생하는 문제입니다. 이로 인해 시스템이 불안정해지거나 예기치 않은 동작이 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
net: psp: check for device unregister when creating assoc
psp_assoc_device_get_locked() obtains a psp_dev reference via
psp_dev_get_for_sock() (which uses psp_dev_tryget() under RCU);
it then acquires psd->lock and drops the reference. Before
the lock is taken, psp_dev_unregister() can run to completion:
take psd->lock, clear out state, unlock, drop the registration
reference.
The expectation is that the lock prevents device unregistration,
but much like with netdevs special care has to be taken when
"upgrading" a reference to a locked device. Add the missing
check if device is still alive. psp_dev_is_registered() exists
already but had no callers, which makes me wonder if I either
forgot to add this or lost the check during refactoring...
📍 영향받는 시스템
PSP 관련 기능을 사용하는 Linux 커널 버전
⚔️ 공격 벡터
장치 등록 해제와 연결 생성 작업이 동시에 일어나는 타이밍을 이용한 로컬 공격
🛡️ 대응 방법
PSP 관련 패치가 적용된 최신 Linux 커널로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인