Skip to content

USBUtils 0.0.5

Choose a tag to compare

@AldySan AldySan released this 29 Oct 16:55
· 22 commits to main since this release
7b46ed0

USBUtils 0.0.5

Stability release: fixes the Windows heap-corruption crash that surfaced in "Open ISO to [Explore/Modify]", and ships the project's analysis toolkit inside the repository.

Fixed

  • Windows: heap corruption crashing the GUI. The crash reported in 0.0.4 could be triggered by "Open ISO to [Explore/Modify]" but could also detonate later in unrelated features — the minidumps pointed at the ntdll heap manager, meaning the heap was already damaged elsewhere. Root causes (found by analyzing user-supplied minidumps, see docs/crash-v0.0.4-iso-explorer.md):
    • The Windows package now always bundles the MinGW runtime DLLs (libstdc++-6.dll, libgcc_s_seh-1.dll, libwinpthread-1.dll) that Qt6Core.dll imports. Previously Windows loaded them from whatever GCC runtime it found on the machine (e.g. an MSYS2 folder built with a different GCC) — a classic mixed-runtime heap corruption; on machines without any MinGW the app would not start at all. The packaging script now walks the import tables of the bundled Qt DLLs and plugins, and fails the build if any of the three is missing.
    • Ps2LoadDialog's thread helper captured stack locals by reference inside a worker-thread lambda and freed the QThread object while the OS thread could still be inside its teardown — a use-after-free that slowly corrupted the heap. Rewritten: the callable is copied into the worker, the result lives in a shared heap slot, and the wait happens in a proper QEventLoop.
    • WorkerThread now owns its own finished → deleteLater connection (the canonical Qt pattern); the hand-rolled lifetime wiring at all nine call sites was removed so nobody can get the contract wrong again.
    • The startup update-check thread is tracked via QPointer and cannot dangle at shutdown.
    • ISO9660 parser hardening (defense in depth, found while auditing): directory records must fully fit inside the extent — a record with a lied-about identifier length or a truncated header used to read past the buffer. Guarded by a hostile-ISO regression test (tools/hostile_iso_test.py).
  • CLI: usbutils drives now prints a friendly message when no removable drive is found, instead of an empty listing.

Added

  • The analysis toolkit now ships in the repository (tools/) — the Python tooling that produced this reimplementation: the reverse-engineering kit (PE resource/DFM extraction, binary DFM-to-text converter, Delphi string-reference finder, function-window extractor, usbutil.rcn decoder), the three minidump parsers used for both Windows crash forensics, the procedural icon generator and the hostile-ISO regression test. Everything runs on a stock Python 3; see tools/README.md.

Changed

  • The release-packaging script runs out of the box and self-discovers the full Qt/MinGW DLL closure.

Downloads

File Contents
usbutils-0.0.5-windows-x86_64.zip GUI (usbutils-gui.exe) + CLI (usbutils.exe) + all required Qt and MinGW runtime DLLs + data files
usbutils-0.0.5-linux-x86_64.tar.gz GUI (usbutils-gui) + CLI (usbutils) + bundled Qt runtime + data files

Both packages are self-contained: extract and run — no Qt installation, no other downloads needed.

As always: the GUI performs a silent update check a few seconds after startup; the CLI has usbutils check-update.