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

mach_inject crashes target in OSX 10.12 (Sierra), unless if launched through Xcode #18

Open
loco41211 opened this issue Sep 21, 2016 · 3 comments

Comments

@loco41211
Copy link

Is this working for everyone else in 10.12/Sierra?

I have an odd situation where mach_inject works perfectly fine, when my app is launched through Xcode. If I launch my app directly, the target process crashes as soon as it attempts to inject:

Date/Time:             2016-09-21 22:55:58.682 +0100
OS Version:            Mac OS X 10.12 (16A323)
Report Version:        12
Anonymous UUID:        8AD07C6C-3EFE-5D39-B58B-393D95473947


Time Awake Since Boot: 3400 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000e50d34ab
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

External Modification Warnings:
Thread creation by external task.

VM Regions Near 0xe50d34ab:
    Stack                  00000000bf800000-00000000c0000000 [ 8192K] rw-/rwx SM=PRV  
--> 
    Submap                 00000000ffff0000-00000000ffff1000 [    4K] r--/r-- SM=PRV  process-only VM submap

Does anyone have any ideas on how to tackle this?

@rodionovd
Copy link

Please don't file a bug report stating mach_inject is crashing for you when you try to use it -- you have to be hard-core enough to debug the problem yourself.

But anyway, it would be nice if you provide a simple demo project to reproduce the crash. Thanks

@smic
Copy link

smic commented Nov 2, 2016

I get the same crash since Sierra. I'm using mach_inject in my application www.interface-inspector.com
Interesting is the message "Thread creation by external task.". I don't get crashes anymore after I disabled SIP.

@doshisahil
Copy link

doshisahil commented Aug 22, 2017

did you try codesigning your application and bundle which is getting injected?

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

No branches or pull requests

4 participants