Skip to content

Linux: start exploit tools only once the device opens; name a refused tool as a USB permission timeout - #139

Merged
henrikklee merged 1 commit into
mainfrom
usb-access-handoff
Dec 2, 2026
Merged

henrikklee merged 1 commit into
mainfrom
usb-access-handoff

Conversation

@henrikklee

Copy link
Copy Markdown
Contributor

On Linux, as a normal user, a start through palera1n or checkra1n can fail because the device is a new USB node at each stage, and udev gives the account access to it only a moment after it appears. tools#82 made orchard's own opens wait for that. The tools orchard starts didn't wait.

What changes for users (Linux)

  • palera1n and checkra1n start only once the device opens for the user's account, so they aren't refused it in their first moment. This covers DFU right after a replug, and Pongo for palera1n's second run in the iPadOS overlay boot.
  • If a tool is still refused the device as it comes back on USB during the exploit (EACCES) and doesn't get it back, the start now ends with "USB permission: was refused the device …", plus the fix: orchard setup usb, or orchard under sudo when the rule is already there. Before, it said "Pongo did not appear on USB" or "did not finish".
  • The iOS 12–14 checkra1n start (installer overlay/companion, resize) used to report "usbmuxd is not running" after 7 minutes. It now reports checkra1n's own failure about a minute after checkra1n goes quiet on an error ("Timed out in state 1", or the USB permission timeout).

What it can't fix: checkra1n 0.12.4 and palera1n reopen the device by themselves right after the checkm8 trigger. They do it inside their own process, before udev applies any rule. orchard can't hold them back there, and the udev rules already cover every identity in the logs (05ac:1227 DFU, 1281 recovery, 4141 Pongo). checkra1n 0.1337.3 tries again on its own and recovers. The others don't, and only running them as root avoids that moment. The new error says so. gaster already retries its open on its own.

orchard#416 also shows that 0.12.4's checkm8 fails on that A7 even as root. That is the known A7-on-Linux limit (tools#114). This PR only makes it report the real error, quickly.

Tests: usb_node (finding the node, waiting until it opens, a refused tool that recovers vs one that doesn't) and access_checkra1n (the #416 logs give the real error, not usbmuxd). cargo test -p orchard-runtime --lib passes, and clippy shows nothing new. The workspace isn't rustfmt-clean on main and CI doesn't run fmt, so I didn't reformat.

Refs OrchardLinux/orchard#416, #119.

… tool as a USB permission timeout

palera1n and checkra1n are started only once the device's USB node opens
for this account (udev's rule applied), and a run whose tool was refused
the device (EACCES) and did not get it back ends with a USB permission
error and its fix instead of "Pongo did not appear on USB" or a timeout.
The checkra1n access route reports checkra1n's own last error a minute
after it goes silent, instead of "usbmuxd is not running" after 7 minutes.

orchard#416, tools#119.

Assisted-by: LLM
@henrikklee
henrikklee merged commit e5c522a into main Dec 2, 2026
11 checks passed
@henrikklee
henrikklee deleted the usb-access-handoff branch December 2, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant