fix(exploit): Add retry limits to unbounded exploit loops
Setup stage and spray stall loops now bail after MAX_SETUP_RETRIES (50) and MAX_STALL_RETRIES (100) attempts respectively, preventing infinite hangs on unresponsive devices. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a810516aff
commit
c5d65e823c
3 changed files with 61 additions and 12 deletions
|
|
@ -223,8 +223,9 @@ int checkm8_usb_request_leak(libusb_device_handle *usb);
|
|||
* checkm8_stall -- Repeatedly send GET_DESCRIPTOR with variable abort
|
||||
* timeout until the device responds with a short transfer and a
|
||||
* successful leak request. Matches gaster's checkm8_stall().
|
||||
* Returns 0 on success, -1 if MAX_STALL_RETRIES is exceeded.
|
||||
*/
|
||||
void checkm8_stall(libusb_device_handle *usb);
|
||||
int checkm8_stall(libusb_device_handle *usb);
|
||||
|
||||
/*
|
||||
* checkm8_no_leak -- Async GET_DESCRIPTOR with 1ms timeout and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue