Skip to content

Commit

Permalink
This patch only works on 14 anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
Siguza committed Jun 22, 2021
1 parent 491e9dd commit 8f40617
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions checkra1n/kpf/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1669,8 +1669,8 @@ void command_kpf() {
xnu_pf_patchset_destroy(xnu_plk_data_const_patchset);
}

const char kmap_port_string[] = "userspace has control access to a"; // panic string is broken up over multiple lines, which in some versions inserted quotes
const char *kmap_port_string_match = memmem(text_cstring_range->cacheable_base, text_cstring_range->size, kmap_port_string, strlen(kmap_port_string));
const char kmap_port_string_14[] = "\"userspace has control access to a \" \"kernel map %p through task %p\""; // iOS 14 had broken panic strings
const char *kmap_port_string_14_match = memmem(text_cstring_range->cacheable_base, text_cstring_range->size, kmap_port_string_14, strlen(kmap_port_string_14));

kpf_dyld_patch(xnu_text_exec_patchset);
kpf_amfi_patch(xnu_text_exec_patchset);
Expand All @@ -1682,7 +1682,7 @@ void command_kpf() {
kpf_nvram_unlock(xnu_text_exec_patchset);
kpf_find_shellcode_area(xnu_text_exec_patchset);
kpf_find_shellcode_funcs(xnu_text_exec_patchset);
if(kmap_port_string_match) // Older versions don't have this
if(kmap_port_string_14_match) // iOS 14 only
{
kpf_convert_port_to_map_patch(xnu_text_exec_patchset);
}
Expand Down

0 comments on commit 8f40617

Please sign in to comment.