Repository navigation
Linux: start exploit tools only once the device opens; name a refused tool as a USB permission timeout - #139
Merged
Merged
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
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".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) andaccess_checkra1n(the #416 logs give the real error, not usbmuxd).cargo test -p orchard-runtime --libpasses, 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.