Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TLV initialization on AArch64 #814

Merged
merged 3 commits into from
Aug 19, 2024
Merged

Fix TLV initialization on AArch64 #814

merged 3 commits into from
Aug 19, 2024

Conversation

jiska2342
Copy link
Contributor

Fix a number of issues introduced in #709. Injecting a library using TLVs now works on iOS.

Tested on an iPhone 14 running iOS 16.2.1 with Dopamine.

Constructors may already access thread-local variables, hence we need to
initialize these first, before emitting callouts to initializers.
@jiska2342 jiska2342 changed the title Fix TLV initialization on Aarch64 Fix TLV initialization on AArch64 Aug 6, 2024
- We now store the allocated TLV area into the correct slot in the
  region pointed to by TPIDRRO_EL0, instead of vice versa.
- tlv_get_addr_addr may be signed by Dyld; strip the signature before
  calling it from the runtime.
- We want to skip pre-allocated pthread keys, but emitted the wrong
  condition. We now correctly check against the key.
@oleavr
Copy link
Member

oleavr commented Aug 19, 2024

Thanks, this is awesome! 🤩

@oleavr oleavr merged commit c827a73 into frida:main Aug 19, 2024
26 of 32 checks passed
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.

2 participants