🇰🇷 한글 설명
Linux 커널의 usb gadget f_hid 드라이버에서 unbind 후 다시 bind할 때, cdev가 사용 중임에도 불구하고 cdev_init을 호출하여 재초기화하는 취약점이 발견되었습니다. 이는 Use-After-Free(UAF)와 유사한 불안전한 동작을 유발할 수 있습니다. 이 문제는 cdev_alloc을 사용하여 cdev를 힙에 할당함으로써 해결되었습니다.
💡 쉬운 설명
USB 장치를 연결 해제했다가 다시 연결할 때, 기존에 사용 중이던 장치 정보가 제대로 정리되지 않아 시스템 오류나 보안 문제가 생길 수 있는 결함입니다. 장치 정보를 메모리의 안전한 곳에 새로 만들도록 수정하여 문제를 해결했습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: gadget: f_hid: don't call cdev_init while cdev in use
When calling unbind, then bind again, cdev_init reinitialized the cdev,
even though there may still be references to it. That's the case when
the /dev/hidg* device is still opened. This obviously unsafe behavior
like oopes.
This fixes this by using cdev_alloc to put the cdev on the heap. That
way, we can simply allocate a new one in hidg_bind.
📍 영향받는 시스템
Linux kernel (usb gadget f_hid driver 사용 환경)
⚔️ 공격 벡터
로컬 공격자가 USB gadget 장치를 반복적으로 unbind 및 bind하여 메모리 오류 유도
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 수정된 패치 버전 이후인지 확인