🇰🇷 한글 설명
리눅스 커널의 driver core에서 dev_has_sync_state() 함수가 device_lock 없이 dev->driver를 두 번 읽는 취약점이 발견되었습니다. 이로 인해 장치 해제 과정에서 dev->driver가 NULL로 변경될 경우 잘못된 메모리 참조가 발생할 수 있습니다. READ_ONCE()를 사용하여 드라이버 포인터를 한 번만 읽도록 수정되었습니다.
💡 쉬운 설명
컴퓨터의 부품을 관리하는 소프트웨어가 부품 정보를 확인하는 도중에 부품이 갑자기 제거되어 정보가 사라지는 문제입니다. 이로 인해 시스템이 예상치 못한 동작을 하거나 오류가 발생할 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
driver core: use READ_ONCE() for dev->driver in dev_has_sync_state()
dev_has_sync_state() reads dev->driver twice without holding
device_lock() -- once for the NULL check and once to dereference
->sync_state. Some callers only hold device_links_write_lock, which
doesn't prevent a concurrent unbind from clearing dev->driver via
device_unbind_cleanup().
Fix it by reading dev->driver exactly once with READ_ONCE(), pairing
with the WRITE_ONCE() in device_set_driver().
📍 영향받는 시스템
Linux Kernel (driver core 관련 버전)
⚔️ 공격 벡터
장치 해제(unbind)와 상태 확인이 동시에 일어나는 경합 조건(Race Condition)을 이용한 공격
🛡️ 대응 방법
리눅스 커널을 최신 보안 패치가 적용된 버전으로 업데이트하십시오.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인하십시오.