CVE-2026-116776
JSON

7.0high

USB Test: Heap-based Buffer Overflow in getSectorSize via untrusted DISK_GEOMETRY.BytesPerSector leads to RCE/DoS

Severity
7.0high CVSS:4.0 by GitHub_M
Exploit likelihood
0.21% (higher than 12% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

Description

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(), &sector, 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.

Affected

Product or packageVersionsReported by
n-romanovich usb-test< 1.1.5CVE List

Classification

CWE-122

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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(), &sector, 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.

NVD (es)

USB Test es una utilidad ligera de línea de comandos (CLI) para Windows que verifica la integridad de los sectores y detecta la capacidad sobreinformada en unidades flash USB. Versiones anteriores a la versión 1.1.5, “getSectorSize()” en USB Test/src/driveinfo.cpp confía en “DISK_GEOMETRY.BytesPerSector” devuelto por “IOCTL_DISK_GET_DRIVE_GEOMETRY” sin verificar si la llamada tuvo éxito o sin aplicar límites de tamaño. USB Test/src/drivetest.cpp utiliza el valor para la división y para dimensionar un búfer en el heap antes de “memcpy(buffer.data(), &sector, 8)”, por lo que un dispositivo de almacenamiento USB malicioso conectado físicamente puede informar un valor inferior a ocho bytes y causar escrituras fuera de límites repetidas, o informar cero y causar una denegación de servicio por división por cero cuando un usuario inicia una prueba de unidad. La corrupción del heap puede bloquear la aplicación elevada y podría permitir la ejecución de código arbitrario. Este problema se corrige en la versión 1.1.5.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-116776 changed 2026-10-29CVE Terms of Use
NVDCVE-2026-116776 changed 2026-11-04Public domain