🇰🇷 한글 설명
Linux 커널의 USB idmouse 드라이버에서 연결 해제 시 발생하는 레이스 컨디션으로 인해 Use-After-Free 취약점이 존재합니다. mutex_unlock()이 객체의 수명을 직접 관리할 수 없는 특성을 이용해 kref를 도입하여 드라이버 데이터 해제 시의 문제를 해결했습니다.
💡 쉬운 설명
USB 마우스가 연결 해제되는 순간 프로그램이 메모리를 잘못된 방식으로 사용하여 시스템 오류를 일으킬 수 있는 문제입니다. 이를 방지하기 위해 메모리 관리 방식을 더 안전하게 수정했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
USB: idmouse: fix use-after-free on disconnect race
mutex_unlock() may access the mutex structure after releasing the lock
and therefore cannot be used to manage lifetime of objects directly
(unlike spinlocks and refcounts). [1][2]
Use a kref to release the driver data to avoid use-after-free in
mutex_unlock() when release() races with disconnect().
[1] a51749ab34d9 ("locking/mutex: Document that mutex_unlock() is
non-atomic")
[2] 2b9d9e0a9ba0 ("locking/mutex: Clarify that mutex_unlock(), and most
other sleeping locks, can still use the lock object
after it's unlocked")
📍 영향받는 시스템
Linux kernel (USB idmouse driver 포함 버전)
⚔️ 공격 벡터
USB 장치의 연결 및 해제 과정에서 의도적인 타이밍 공격(Race Condition)을 통한 메모리 오염
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 버전 이후인지 확인