-
Notifications
You must be signed in to change notification settings - Fork 86
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
(probably not the most mergable) *reliable* M1 iPad Pro support #49
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -262,7 +262,7 @@ class ViewController: UIViewController, ElectraUI { | |||||||||||||||||||||||||||||||
case .kfdPhysPuppet: | ||||||||||||||||||||||||||||||||
print("Selecting kfd [physpuppet] for iOS 14.0 - 14.8.1") | ||||||||||||||||||||||||||||||||
LogStream.shared.pause() | ||||||||||||||||||||||||||||||||
let ret = do_kopen(0x800, 0x0, 0x2, 0x2) | ||||||||||||||||||||||||||||||||
let ret = do_kopen(0x20000, 0x0, 0x2, 0x2) | ||||||||||||||||||||||||||||||||
LogStream.shared.resume() | ||||||||||||||||||||||||||||||||
if ret != 0 { | ||||||||||||||||||||||||||||||||
print("Successfully exploited kernel!"); | ||||||||||||||||||||||||||||||||
|
@@ -272,7 +272,7 @@ class ViewController: UIViewController, ElectraUI { | |||||||||||||||||||||||||||||||
case .kfdSmith: | ||||||||||||||||||||||||||||||||
print("Selecting kfd [smith] for iOS 14.0 - 14.8.1") | ||||||||||||||||||||||||||||||||
LogStream.shared.pause() | ||||||||||||||||||||||||||||||||
let ret = do_kopen(0x800, 0x1, 0x2, 0x2) | ||||||||||||||||||||||||||||||||
let ret = do_kopen(0x20000, 0x1, 0x2, 0x2) | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
detect M1 |
||||||||||||||||||||||||||||||||
LogStream.shared.resume() | ||||||||||||||||||||||||||||||||
if ret != 0 { | ||||||||||||||||||||||||||||||||
print("Successfully exploited kernel!"); | ||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -176,7 +176,7 @@ u64 kopen(u64 puaf_pages, u64 puaf_method, u64 kread_method, u64 kwrite_method) | |||||||||||||||
timer_start(); | ||||||||||||||||
|
||||||||||||||||
const u64 puaf_pages_min = 16; | ||||||||||||||||
const u64 puaf_pages_max = 2048; | ||||||||||||||||
const u64 puaf_pages_max = 131072; | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
detect M1 |
||||||||||||||||
assert(puaf_pages >= puaf_pages_min); | ||||||||||||||||
assert(puaf_pages <= puaf_pages_max); | ||||||||||||||||
assert(puaf_method <= puaf_smith); | ||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -208,6 +208,10 @@ void krkw_helper_run_allocate(struct kfd* kfd, struct krkw* krkw) | |||||||||||||||||||||||||||||||||||||||||||||||||
for (u64 i = 0; i < kfd->puaf.number_of_puaf_pages; i++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||
u64 puaf_page_uaddr = kfd->puaf.puaf_pages_uaddr[i]; | ||||||||||||||||||||||||||||||||||||||||||||||||||
print_buffer(puaf_page_uaddr, 64); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
uint32_t magicToSearch = 0x1EA5CACE; | ||||||||||||||||||||||||||||||||||||||||||||||||||
void *res = memmem((void *)kfd->puaf.puaf_pages_uaddr[i], 0x4000, &magicToSearch, sizeof(magicToSearch)); | ||||||||||||||||||||||||||||||||||||||||||||||||||
assert(res == NULL); | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+211
to
+214
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed.
Comment on lines
208
to
+214
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
not completely sure if this would break M1, but just to be sure for now I'm keeping the check in. |
||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
assert_false(krkw_type); | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -25,7 +25,7 @@ u32 kread_IOSurface_kread_u32(struct kfd* kfd, u64 kaddr); | |||||||||||||||||
|
||||||||||||||||||
void kread_IOSurface_init(struct kfd* kfd) | ||||||||||||||||||
{ | ||||||||||||||||||
kfd->kread.krkw_maximum_id = 0x4000; | ||||||||||||||||||
kfd->kread.krkw_maximum_id = 0x1000; | ||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
detect M1 |
||||||||||||||||||
kfd->kread.krkw_object_size = 0x400; //estimate | ||||||||||||||||||
|
||||||||||||||||||
kfd->kread.krkw_method_data_size = ((kfd->kread.krkw_maximum_id) * (sizeof(struct iosurface_obj))); | ||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -36,8 +36,8 @@ void setLr(arm_thread_state64_t *state, uint64_t lr); | |||||||||
void setPc(arm_thread_state64_t *state, uint64_t pc); | ||||||||||
void amfid_test(mach_port_t amfid_port); | ||||||||||
|
||||||||||
#ifdef ENABLE_XPC | ||||||||||
#include <xpc/xpc.h> | ||||||||||
#ifdef ENABLE_XPC | ||||||||||
#include <xpc/xpc.h> | ||||||||||
Comment on lines
+39
to
+40
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
remove accidental indent |
||||||||||
// os_alloc_once_table: | ||||||||||
// | ||||||||||
// Ripped this from XNU's libsystem | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
detect M1.
Sorry I don't know how to make reviews for multiple files so making multiple reviews for them :P