🇰🇷 한글 설명
Azure RTOS USBX의 DFU UPLOAD 기능에서 버퍼 오버플로우 취약점이 발견되었습니다. 공격자가 특정 제어 요청을 통해 메모리 내용을 덮어쓸 수 있으며, 이를 통해 보안 기능을 우회하거나 임의의 코드를 실행할 수 있습니다.
💡 쉬운 설명
USB 연결을 통해 데이터를 주고받는 과정에서 정해진 그릇보다 더 많은 데이터를 밀어 넣어 시스템을 망가뜨리는 문제입니다. 이를 통해 해커가 기기를 마음대로 조종할 수 있는 위험이 있습니다.
🇺🇸 원문 (English)
Azure RTOS USBX is a USB host, device, and on-the-go (OTG) embedded stack. Prior to version 6.1.11, he USBX DFU UPLOAD functionality may be utilized to introduce a buffer overflow resulting in overwrite of memory contents. In particular cases this may allow an attacker to bypass security features or execute arbitrary code. The implementation of `ux_device_class_dfu_control_request` function does not assure that a buffer overflow will not occur during handling of the DFU UPLOAD command. When an attacker issues the `UX_SLAVE_CLASS_DFU_COMMAND_UPLOAD` control transfer request with `wLenght` larger than the buffer size (`UX_SLAVE_REQUEST_CONTROL_MAX_LENGTH`, 256 bytes), depending on the actual implementation of `dfu -> ux_slave_class_dfu_read`, a buffer overflow may occur. In example `ux_slave_class_dfu_read` may read 4096 bytes (or more up to 65k) to a 256 byte buffer ultimately resulting in an overflow. Furthermore in case an attacker has some control over the read flash memory, this may result in execution of arbitrary code and platform compromise. A fix for this issue has been included in USBX release 6.1.11. As a workaround, align request and buffer size to assure that buffer boundaries are respected.
📍 영향받는 시스템
Azure RTOS USBX version 6.1.11 미만 버전
⚔️ 공격 벡터
악의적인 UX_SLAVE_CLASS_DFU_COMMAND_UPLOAD 제어 요청을 전송하여 버퍼 오버플로우 유발
🛡️ 대응 방법
USBX를 버전 6.1.11 이상으로 업데이트하거나, 요청 및 버퍼 크기를 일치시켜 경계 검증을 수행함
🔧 검증 코드
사용 중인 Azure RTOS USBX의 버전을 확인하여 6.1.11 미만인지 체크합니다.
echo 'USBX_VERSION_CHECK' # 실제 환경에서는 설치된 USBX 라이브러리 버전을 확인하는 명령어를 사용해야 함