-
Notifications
You must be signed in to change notification settings - Fork 112
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
Segfaults in Monterey 12.3 with dsdump beta #35
Comments
Possibly related to #30 (comment). Basically, |
-oc works for me but -sc seg faults
macOS 12.3 |
It seems that somehow for dsdump, the next closest VM region after ( MALLOC_SMALL 0x101000000 - 0x103000000 rw-/rwx
MALLOC_NANO 0x600000000000 - 0x600020000000 rw-/rwx
Stack Guard 0x7ff7bbf00000 - 0x7ff7bf700000 ---/rwx And bypassing this protection check does not work indeed. dsdump/dsdump/XRMachOLibrary.mm Line 143 in 74ee2c3
P.S. run
Then, dsdump will fallback to another trial of
*Correction: the fallback Line 40 in 74ee2c3
|
The clues above inspired me. For Monterey, running the old stable release (dsdump_compiled.zip, 1a8857e) with env # Use the old dsdump from stable release.
$ dsdump
Version: 0.1.0 Built: (16:31:02, Jul 5 2020) dsdump [option..] <mach-o-file>
# Normally, it refused to do job on Monterey.
$ dsdump --objc dsdump
0x400000000 is mapped to existing memory, exiting
# To make it work, run it with MallocNanoZone=0.
$ MallocNanoZone=0 dsdump --objc dsdump
@protocol NSObject
-[NSObject isEqual:]
...
... Note: This trick does not work for beta version. |
macOS Version: 12.3 (21E230)
Mapped cache: /System/Library/dyld/dyld_shared_cache_x86_64h
Current cache slide: 0x15015000 (not sure if it helps)
When running:
dsdump -oc /System/Library/Frameworks/Foundation.framework/Foundation
Result:
From LLDB:
When running:
dsdump -sc /System/Library/Frameworks/Combine.framework/Combine
Result:
From LLDB:
When running:
dsdump -a x86_64 -oc /System/Applications/Calculator.app/Contents/MacOS/Calculator
Result:
When running:
dsdump -a x86_64 -sc /System/Library/CoreServices/ControlCenter.app/Contents/MacOS/ControlCenter
Result:
After
NOP
ing thejne
instruction at0x010000da5d
(skipping the check that leads to the above)When running:
dsdump_patched -a x86_64 -oc /System/Applications/Calculator.app/Contents/MacOS/Calculator
Result:
Works as expected
When running:
dsdump_patched -a x86_64 -sc /System/Library/CoreServices/ControlCenter.app/Contents/MacOS/ControlCenter
Result:
From LLDB:
Hope this provides you with enough information. If you need anything else please let me know and if you ever decide to push the source for this version I am fairly confident I could fix it myself.
Thanks again for taking the time!
The text was updated successfully, but these errors were encountered: