🇰🇷 한글 설명
USB Test는 USB 플래시 드라이브의 섹터 무결성과 용량 과다 보고를 검사하는 Windows용 경량 CLI 유틸리티입니다. 1.1.5 이전 버전에서는 getSectorSize()가 IOCTL_DISK_GET_DRIVE_GEOMETRY의 BytesPerSector 값을 검증 없이 신뢰하여, 악의적인 USB 장치가 값을 조작하면 힙 버퍼 오버플로우 또는 0 나눗셈으로 인한 서비스 거부가 발생할 수 있습니다. 이 문제는 1.1.5 버전에서 수정되었습니다.
💡 쉬운 설명
악성 USB 저장장치를 PC에 연결한 뒤 USB Test로 드라이브 검사를 시작하면 프로그램이 비정상 종료되거나 공격자가 코드를 실행할 수 있습니다. 해당 프로그램을 최신 버전으로 업데이트하면 이 문제가 해결됩니다.
🇺🇸 원문 (English)
USB Test is a lightweight Windows CLI utility for verifying sector integrity and detecting overreported capacity on USB flash drives. Prior to version 1.1.5, getSectorSize() in USB Test/src/driveinfo.cpp trusts DISK_GEOMETRY.BytesPerSector returned by IOCTL_DISK_GET_DRIVE_GEOMETRY without checking whether the call succeeded or enforcing size bounds. USB Test/src/drivetest.cpp uses the value for division and to size a heap buffer before memcpy(buffer.data(), §or, 8), so a physically connected malicious USB storage device can report a value below eight bytes and cause repeated out-of-bounds writes, or report zero and cause a divide-by-zero denial of service when a user starts a drive test. The heap corruption can crash the elevated application and may permit arbitrary code execution. This issue is fixed in version 1.1.5.
📍 영향받는 시스템
USB Test 1.1.5 미만 버전이 설치된 Windows 시스템
⚔️ 공격 벡터
물리적으로 연결된 악성 USB 저장장치가 섹터 크기를 8바이트 미만 또는 0으로 보고하여 사용자가 드라이브 테스트를 실행할 때 힙 손상을 유발
🛡️ 대응 방법
USB Test를 1.1.5 이상 버전으로 업데이트하고 신뢰할 수 없는 USB 장치 연결을 피하세요.
🔧 검증 코드
출력된 USB Test 버전이 1.1.5 미만이면 취약하므로 업데이트가 필요하며, 1.1.5 이상이면 수정된 버전입니다 (이 명령은 Windows에서는 wmic로 실행되고, 해당 설치 정보가 없으면 결과가 비어 있을 수 있습니다).
wmic product where "name like '%USB Test%'" get name,version 2>/dev/null || grep -ri 'usb test' /proc/version 2>/dev/null
💻 영향받는 소프트웨어
Storage Protect Snapshot for Windows