diff --git a/src/exploit/checkm8_stages.c b/src/exploit/checkm8_stages.c index bf8968d..29bb63b 100644 --- a/src/exploit/checkm8_stages.c +++ b/src/exploit/checkm8_stages.c @@ -333,6 +333,18 @@ static int stage1_dnload_exact(libusb_device_handle *usb, uint16_t len) free(buf); if (ret < 0) { + /* + * On usbipd the STATUS ACK of a DNLOAD is dropped and surfaces as + * TIMEOUT even though the device consumed every byte; + * send_dfu_finalize() and send_payload_chunks() rely on the same + * property, so a TIMEOUT is not a failed transfer. Failing here + * would break stage 1 on the one transport that needs it most. + */ + if (ret == LIBUSB_ERROR_TIMEOUT) { + log_warn("stage1_dnload_exact: DNLOAD(%u) timed out after " + "sending the block -- continuing", len); + return 0; + } log_error("stage1_dnload_exact: DNLOAD(%u) failed: %s", len, libusb_strerror(ret)); return -1;