mirror of
https://github.com/SignTools/SignTools.git
synced 2026-04-28 11:25:48 +03:00
[GH-ISSUE #555] Injecting 3 or more tweaks causes the injection process to hang and be killed #116
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SignTools#116
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jluo98 on GitHub (Mar 18, 2025).
Original GitHub issue: https://github.com/SignTools/SignTools/issues/555
I tried basic troubleshooting first
Describe the bug
When injecting 3 or more tweaks, the signing process will get stuck at injecting the 3rd tweak, hang, and be killed.
To reproduce
Steps to reproduce the behavior:
Expected behavior
SignTools inject all tweaks provided.
Logs
If possible, please include logs.
Screenshots
N/A
System configuration
Additional context
If I choose any 2 out of the 3 tweaks, signing would likely succeed.
@ViRb3 commented on GitHub (Mar 18, 2025):
I see no reason why the number of tweaks would cause an issue. I have personally injected more than 5 tweaks at once and never had an issue. This will likely be an issue with an individual tweak, or the unique combination of two tweaks. Can you try to narrow it down? Would also appreciate a link to the tweaks.
@jluo98 commented on GitHub (Mar 18, 2025):
That was my initial thought too- that one particular tweak is causing the issue. But I've tired injecting only 1 of them and any 2 of them without issues. Here's the IPA and tweaks if you'd like to take a look.
@ViRb3 commented on GitHub (Mar 19, 2025):
I tracked down the issue. Seems like the particular binary you're trying to inject into has very limited space in its load command section, so you can't add 3x LC_LOAD_DYLIB commands, only two. The injection tool would give you an interactive prompt when there's no space, which the Python script did not handle, so it would hang. I released a fix that will automatically accept any interactive prompts, and also added additional logging. However, ultimately, I think you are out of luck with this binary, unless there's another injection tool that can expand the section. Perhaps a different version of your app would work?
@jluo98 commented on GitHub (Mar 19, 2025):
That makes sense! I just remembered the previous version of this app did in fact accept 3 tweaks, but 4 would hang.
Thanks for tracking down the cause. Honestly I can live with only 2 tweaks for this app.
@jluo98 commented on GitHub (Mar 19, 2025):
I just did another test with the updated SignTools-CI. It seems that all 3 tweaks are injected and working correctly even with the low space warning.