🇰🇷 한글 설명
Linux 커널의 ueagle-atm 드라이버에서 usb_probe와 usb_disconnect 함수가 장치의 펌웨어 상태를 판단하는 기준이 서로 달라 발생하는 취약점입니다. 공격자가 조작된 USB 디스크립터를 가진 장치를 연결할 경우, 잘못된 메모리 참조로 인해 slab-out-of-bounds 오류가 발생하며 시스템 안정성에 영향을 줄 수 있습니다.
💡 쉬운 설명
USB 장치가 연결될 때와 끊어질 때, 컴퓨터가 이 장치가 어떤 종류인지 판단하는 기준이 서로 달라서 생기는 문제입니다. 가짜 정보를 가진 USB를 꽂으면 컴퓨터가 엉뚱한 메모리 영역을 읽으려다 오류를 일으킬 수 있습니다.
🇺🇸 원문 (English)
In the Linux kernel, the following vulnerability has been resolved:
usb: atm: ueagle-atm: reject descriptors that confuse probe and disconnect
uea_probe() distinguishes a pre-firmware device from a post-firmware one
using the USB id (UEA_IS_PREFIRM()), and stores a different object as the
interface data in each case: a 'struct completion' for a pre-firmware
device (to be waited on in .disconnect()), or a 'struct usbatm_data' for a
post-firmware one.
uea_disconnect() instead tells the two apart by the number of interfaces
of the active configuration (a pre-firmware device exposes a single
interface, ADI930 has 2 and eagle has 3), and casts the interface data
accordingly.
Because the two handlers use different criteria, a crafted device that
advertises a pre-firmware id together with a multi-interface descriptor
(or a post-firmware id with a single interface) makes them disagree: the
small 'struct completion' stored by uea_probe() is then passed to
usbatm_usb_disconnect(), which casts it to 'struct usbatm_data' and takes
instance->serialize, reading past the end of the allocation:
BUG: KASAN: slab-out-of-bounds in __mutex_lock+0x152a/0x1b80
Read of size 8 at addr ffff8880470e2c60 by task kworker/1:2/982
...
__mutex_lock+0x152a/0x1b80
usbatm_usb_disconnect+0x70/0x820
uea_disconnect+0x133/0x2c0
usb_unbind_interface+0x1dd/0x9e0
...
which belongs to the cache kmalloc-96 of size 96
The buggy address is located 0 bytes to the right of
allocated 96-byte region [ffff8880470e2c00, ffff8880470e2c60)
Reject such inconsistent descriptors in uea_probe() so that both handlers
always make the same pre/post-firmware decision.
📍 영향받는 시스템
Linux kernel (ueagle-atm 드라이버를 사용하는 시스템)
⚔️ 공격 벡터
조작된 USB 디스크립터(Pre-firmware ID와 불일치하는 인터페이스 개수)를 가진 물리적 USB 장치 연결
🛡️ 대응 방법
Linux 커널을 최신 보안 패치가 적용된 버전으로 업데이트하여 uea_probe() 단계에서 일관되지 않은 디스크립터를 거부하도록 수정해야 합니다.
🔧 검증 코드
출력된 커널 버전이 해당 취약점이 해결된 패치 이후의 버전인지 확인합니다.