🇰🇷 한글 설명
Linux 커널의 USB ldusb 드라이버에서 연결 해제 시 발생하는 레이스 컨디션으로 인해 Use-After-Free 취약점이 존재합니다. mutex_unlock()이 객체의 수명을 직접 관리할 수 없는 특성을 이용해 kref를 도입함으로써 이 문제를 해결했습니다.
💡 쉬운 설명
USB 장치가 연결 해제되는 순간 시스템이 메모리를 잘못 관리하여 발생하는 오류입니다. 이로 인해 시스템이 불안정해지거나 보안 문제가 생길 수 있어 메모리 관리 방식을 수정했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
USB: ldusb: 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")
📍 영향받는 시스템
USB ldusb 드라이버를 사용하는 Linux 커널 버전
⚔️ 공격 벡터
USB 장치의 연결 및 해제 과정에서 의도적으로 타이밍을 맞춘 레이스 컨디션 유도
🛡️ 대응 방법
해당 취약점이 수정된 최신 Linux 커널 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전을 확인하여 취약점이 해결된 패치 버전인지 확인합니다.