-
Notifications
You must be signed in to change notification settings - Fork 84
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
Stack corruption in xnu_override() #3
Comments
Thanks for the report @windoze. That's unexpected, especially as you are on the same hardware and OS build as me. Could you please run this command?
|
The output is:
I can provide more info if you need, thanks. |
Which is line 201 of xnu_override.c for you? What commit are you on? ( |
I'm simply on master, nothing except certificate has been changed:
|
xnu_override.c:201 is the entry of function
|
I think that it's detecting stack canary corruption on exit from the first startup test call to It could be a bug in Udis86, but I'd be surprised if this is the first project to ever hit it. Plus, I can't reproduce it. Hm. |
It looks like your system uptime was only 2 minutes when this kext was loaded. Did you install it to /System/Library/Extensions or did you |
It's kinda weird, https://github.com/KhaosT/tb3-enabler seems to be working for me and this program also works on my old MBP2014 with exactly same version of OS (although it cannot do anything because MBP2014 doesn't have TB3 ports). |
Are you using Thunderbolt3Unblocker and TB3 Enabler at the same time? If so, don't. But the issue seems to be with the code that sets up the patch, and not the patch itself, so it makes sense that TB3 Enabler doesn't panic. |
What version of Xcode did you use to compile it? |
It's Version 9.2 (9C40b), clang version is Apple LLVM version 9.0.0 (clang-900.0.39.2) |
Oh, did you use Release or Debug build? I guess it may affect things. |
Same Xcode works here. Debug build. |
Ok, I'm using Release build, let me revert back tb3-enabler and try Debug, hold on, need to restart my computer. |
No luck, still the same Kernel panic log:
|
Are you loading with |
I'm loading with kextload, the command is |
Output of |
It's a new Mac I just got yesterday, nothing has been set specifically. |
Ah, that's good to know. Very interesting. Thanks for your help. |
I wish I did help. Now I need to reboot my computer again, bye 😄 |
Kernel_2018-02-14-083326_Kenneths-MacBook-Pro.panic.zip Thunderbolt3Unblocker.kext.zip MD5 (/System/Library/Kernels/kernel) = e56518f915ae8d978673d64d70e468aa nvram: Error getting variable - 'boot-args': (iokit/common) data was not found |
Just wanted to drop by and say that I also got the same kernel panic when loading this kext. Happened immediately after iMac Pro, macOS 10.13.3 |
Thank you @kfiil, I can now reproduce this issue. I have switched to the Zydis disassembler in the |
I was able to confirm that //#define __UD_STANDALONE__ 1
#include "udis86/udis86.h"
int main() {
ud_t u;
ud_init(&u);
return 0;
} causes stack corruption. Switching from Udis86 to Zydis hopefully addresses the issue. Please let me know. |
I tried the Zydis branch but it doesn't build on my machine, MBP2017 10.13.3 here are a few of the last lines in the error log: export WRAP_ASSET_PACKS_IN_SEPARATE_DIRECTORIES=NO
export XCODE_APP_SUPPORT_DIR=/Applications/Xcode.app/Contents/Developer/Library/Xcode
export XCODE_PRODUCT_BUILD_VERSION=9C40b
export XCODE_VERSION_ACTUAL=0920
export XCODE_VERSION_MAJOR=0900
export XCODE_VERSION_MINOR=0920
export arch=x86_64
export variant=normal
/bin/sh -c /Users/yassine/Coding/testing/TB3/Thunderbolt3Unblocker/xnu_override/build_zydis.sh
Error: could not load cache
Command /bin/sh failed with exit code 1 |
Please |
Hi, I get this build error ~/Library/Developer/Xcode/DerivedData/Thunderbolt3Unblocker-ezxuoqykbtxvicerbhdyjuxspdxj/Build/Products/Debug/zydis ~/Sandbox/OpenSource/Thunderbolt3Unblocker/xnu_override/zydis |
Perfect, it works now (Works on My Machine). A suggestion, in the readme add default location of the Thunderbolt3Unblocker.kext file and how to build unsigned if peps do not have a developer account! Thanks for the hard work! |
Good point on the README but I don’t have specific instructions at hand (since I do sign my kext). Feel free to send a PR! Closing this one. |
MacBookPro14,3, macOS 10.13.3 (17D47)
SIP disabled with
sudo csrutil enable --without kext
Kernel panic log:
The text was updated successfully, but these errors were encountered: