68 Commits

Author SHA1 Message Date
PMheart
b06c6b3fcb OcAppleKernelLib: Fix kext bundle version copying, thanks @mhaeuser 2022-07-12 10:08:49 +02:00
PMheart
53c67f308c
OcAppleKernelLib: Fix user after free, thanks @mhaeuser (#368) 2022-07-11 13:29:58 +02:00
Marvin Häuser
bd2d3f29ab OcAppleKernelLib: Do not locate __PRELINK_INFO for Kernel Collections
As of macOS 13 Developer Beta 3, the __PRELINK_INFO marker segment is
broken. It is not actually used in the Kernel Collection paths, so
just don't locate it at all to avoid future mistakes.
2022-07-07 17:52:25 +02:00
Marvin Häuser
d916dd65b8 OcMachoLib: Treat container Mach-O as reference file
As of macOS 13 Developer Beta 3, the Kernel Collection's inner kernel
references a segment that precedes itself. The current model is that
a Kernel Collection is a container format and the included files are
(mostly) separate. Hence, this was treated as an out-of-bounds issue.
Kernel Collections apparently are rather an unconventional composite
format, where the sub-files are still part of the whole. Redesign
OcMachoLib to treat the Kernel Collection as the reference file.
Patches still use only the inner file, while parsing considers the
whole file.
2022-07-07 17:52:25 +02:00
PMheart
33978d85ac
OcAppleKernelLib: Print injected kext bundle version in DEBUG builds (#358) 2022-06-23 07:48:45 +03:00
PMheart
228f8ca1fb Codestyle: Apply codestyle changes with Uncrustify 2022-04-25 14:51:15 +02:00
PMheart
95b487a2a3
OcAppleKernelLib: Kext block strategy for prelinked (#320) 2022-02-11 10:54:30 +01:00
Marvin Häuser
3db6e1b996 Fix includes to work nicer with IDEs 2021-11-23 10:55:26 +01:00
John Davis
ca266bf2f3 OcAppleKernelLib: Fix incorrect spacing in debug print statement 2021-07-12 19:36:17 -05:00
Download-Fritz
7732a7b6d2 OcAppleKernelLib: Zero trailing KC expansion 2020-10-25 12:43:36 +01:00
John Davis
676ef93d9d
OcAppleKernelLib: Add 32-bit prelinking support (#122) 2020-09-29 12:41:37 +03:00
John Davis
74062d4e0f
OcAppleKernelLib: Add 32-bit Mach-O and patching support (#118) 2020-09-13 22:57:10 +03:00
vit9696
6df942413c OcAppleKernelLib: Fix issues in 11.0 kext injection and patching
- KcGetKextSize may report far larger kext size due to using segment
  address instead of kext address as a base.
- KC Mach-O header rebuild may make Context->LinkEditSegment point
  to invalid memory breaking KcGetKextSize in the kext patcher.
2020-09-04 15:28:08 +03:00
vit9696
53614abdad OcAppleKernelLib: Fix prelinked kext patches in KC mode 2020-09-02 10:21:00 +03:00
John Davis
8b452306e5
OpenCoreKernel: Implement force injection of system kexts (#111) 2020-08-27 18:52:53 +03:00
vit9696
ca6c829961 OcAppleKernelLib: Rework AppleCpuPmCfgLock to support 10.6.8 2020-08-23 17:04:08 +03:00
vit9696
5ded24b71f OcAppleKernelLib: Expose kernel version to quirks 2020-08-22 22:28:28 +03:00
vit9696
04fa1c2394
OcAppleKernelLib: Implement cacheless & mkext kext patching and quirks (#102) 2020-08-18 23:47:38 +03:00
vit9696
b5dcbd32d1
OcAppleKernelLib: Implement KXLD link state handling (#101) 2020-08-16 00:33:56 +03:00
vit9696
c3e14b6824
OcAppleKernelLib: Implement mkext injection support (#99) 2020-08-15 00:40:06 +03:00
Goldfish64
cbdef704f4 OcXmlLib: Add plist doctype export option 2020-07-26 20:25:25 -05:00
vit9696
802dcdbf19 OcAppleKernelLib: Fix arg order for OcKernelLoadKextsAndReserve 2020-07-07 00:14:45 +03:00
vit9696
27053778bc OcAppleKernelLib: Fix relocation support for EfiBoot in KC mode 2020-07-05 18:54:38 +03:00
vit9696
995924032c OcAppleKernelLib: Get kernel patcher work (mostly) 2020-07-05 04:23:43 +03:00
vit9696
ef8fdce8cd OcAppleKernelLib: Fix linking against injected kexts 2020-07-05 04:23:43 +03:00
vit9696
1ef945991a OcAppleKernelLib: Fix __LINKEDIT handling in KC mode 2020-07-04 19:04:06 +03:00
vit9696
605878e57a OcAppleKernelLib: Partially fix symbol resolution from kexts 2020-07-04 17:10:03 +03:00
Download-Fritz
07b697d28d OcMachoLib: Support KC Mach-Os 2020-07-04 15:28:22 +02:00
vit9696
6fdd4a2834 OcXmlLib: Treat non-hex data as integer data
In 11.0 kc plist pointer data is in decimal
2020-07-04 16:04:02 +03:00
vit9696
e09b29d7e0 OcAppleKernelLib: Fix legacy kernel injection 2020-07-04 15:29:38 +03:00
Download-Fritz
4908a5374c OcAppleKernelLib: Fix prelinkedkernel injection 2020-07-04 13:22:17 +02:00
vit9696
0271bacc27 OcAppleKernelLib: More progress with 11.0, many thx to @Download-Fritz 2020-07-04 01:58:04 +03:00
Download-Fritz
2ae43ab055 OcAppleKernelLib: Support KC kernel symbols and fix PLIST 2020-06-29 20:34:01 +02:00
vit9696
764c5c2277 OcAppleKernelLib: Continue working on KC prelinking 2020-06-29 08:45:42 +03:00
vit9696
50cf6148c9 OcAppleKernelLib: Fix compiler warning in MSVC 2020-06-29 07:02:01 +03:00
vit9696
69954a6105 OcAppleKernelLib: Fix regression in the previous commit
closes acidanthera/bugtracker#1013
2020-06-29 06:59:10 +03:00
vit9696
44081eb08b OcAppleKernelLib: Make more progress with KC context init 2020-06-29 00:27:35 +03:00
vit9696
ebdc3fa056 OcAppleKernelLib: Start building new Mach-O functions 2020-06-27 20:55:16 +03:00
Download-Fritz
062e898e26 Fix GCC warnings 2020-05-31 13:23:27 +02:00
vit9696
e6bec3ae80 Debug: Fix some log tags 2020-05-17 16:53:02 +03:00
vit9696
3ec848da3d Build: Replace RETURN_ macros with EFI_ 2020-04-18 15:55:05 +03:00
Download-Fritz
53ea852bc3 OcAppleKernelLib: Support trailing exec-less kexts 2019-11-04 17:09:52 +01:00
Download-Fritz
156cb7c586 Various type and cast fixes 2019-11-02 23:16:33 +01:00
Download-Fritz
6c882e1cbc OcMachoLib/OcAppleKernelLib: Support Kernel Resource KEXTs 2019-09-07 17:28:36 +02:00
vit9696
1fd900012d OcAppleKernelLib: Debug assert on select invalid kexts 2019-04-21 15:21:16 +03:00
Download-Fritz
aa490fa0e3 OcAppleKernelLib: Cosmetical changes. 2019-04-05 21:04:05 +02:00
vit9696
7f296b49d0 OcAppleKernelLib: Fix vtable building for dependency kexts 2019-04-01 18:53:44 +03:00
vit9696
b1cf08c902 OcAppleKernelImageLib: Fix _kmod_info stab handling 2019-04-01 16:20:55 +03:00
vit9696
20ebb4c57c OcAppleKernelLib: Add invariants for Mach-O context creation 2019-03-29 23:46:56 +03:00
Download-Fritz
69ff0f89e4 OcAppleKernelLib: Prevent memory leak on SymbolTable construction failure. 2019-03-28 09:22:20 +01:00