73 Commits

Author SHA1 Message Date
PMheart
0b806dccdf OcAppleKernelLib: Fix minor typo 2022-07-08 20:06:15 +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
228f8ca1fb Codestyle: Apply codestyle changes with Uncrustify 2022-04-25 14:51:15 +02:00
Goldfish64
9e35a94f49 OcAppleKernelLib: Add vtable patching failure debug statements 2021-05-31 20:58:56 -05: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
dc923bc895 OcAppleKernelLib: Partially fix kext blocking for 11.0 2020-08-22 09:54:29 +03:00
vit9696
57f4824a8e
OcAppleKernelLib: Older kernel kext base is lower 2020-07-06 00:31:14 +03:00
vit9696
d8ace47606 OcAppleKernelLib: Fix patching KC vtables with imports from kexts 2020-07-05 23:18:10 +03:00
vit9696
0b3dcf4f7e OcAppleKernelLib: Improve handling of KC DySymtab 2020-07-04 20:21:37 +03:00
vit9696
e6bec3ae80 Debug: Fix some log tags 2020-05-17 16:53:02 +03:00
Download-Fritz
1c27b3a65e OcMachoLib: Prevent accidential VTable sym matches via overflow 2019-08-28 16:44:43 +02:00
Download-Fritz
4917e8d73e OcGuardLib: Introduce OC_ALIGNOF and deprecate OC_ALIGNED 2019-08-28 15:37:55 +02:00
Download-Fritz
ac698454a1 OcAppleKernelLib: Re-construct VTables to W/A StringTable relocation 2019-07-06 11:05:21 +02:00
Download-Fritz
59d027b496 OcAppleKernelLib: Fix typo in VTable patching 2019-07-06 09:41:43 +02:00
Download-Fritz
aa490fa0e3 OcAppleKernelLib: Cosmetical changes. 2019-04-05 21:04:05 +02:00
vit9696
dfe7f8f5d4 analysis: Fix warnings 2019-04-03 06:37:38 +03:00
vit9696
7f296b49d0 OcAppleKernelLib: Fix vtable building for dependency kexts 2019-04-01 18:53:44 +03:00
vit9696
8255f23ff0 OcAppleKernelLib: Tune based on profiling data 2019-03-29 01:24:04 +03:00
Download-Fritz
27e0783af3 OcAppleKernelLib: Lookup prelinked VTables via Prelinked Symbol Table. 2019-03-27 13:52:09 +01:00
Download-Fritz
146faf684d OcAppleKernelLib: Skip STABs during prelinked KEXT VTable enum. 2019-03-27 10:47:32 +01:00
vit9696
5d1901ac52 OcAppleKernelLib: Fix uninitialised data access caused by improper vtable construction 2019-03-27 09:37:02 +03:00
Download-Fritz
37e30743fd OcAppleKernelLib: Do not resolve STABs or use them for kmod_info/SMCPs. 2019-03-26 23:16:56 +01:00
Download-Fritz
362d2ba795 OcAppleKernelLib: Verify VTable length only via extern relocs. 2019-03-26 17:18:22 +01:00
Download-Fritz
074c25fcc9 OcAppleKernelLib: Fix VTable patching walk. 2019-03-26 17:01:05 +01:00
Download-Fritz
f23304aeda OcAppleKernelLib: Make VTable iteration easier to read. 2019-03-26 16:40:42 +01:00
Download-Fritz
6e002e3259 OcAppleKernelLib: Slightly nicer VTable patch construction. 2019-03-26 16:35:24 +01:00
Download-Fritz
4c518b90f6 OcAppleKernelLib: Two VTables are constructed per iteration. 2019-03-26 16:34:21 +01:00
Download-Fritz
d40c3b96b5 OcAppleKernelLib: Do not mess up VTable entry order. 2019-03-26 16:02:00 +01:00
Download-Fritz
b5ccf1f93b OcMachoLib: Support local relocations when getting a symbol by offset. 2019-03-26 15:34:33 +01:00
Download-Fritz
422dd9e146 OcAppleKernelLib: Make VTable iteration more readable. 2019-03-26 12:20:01 +01:00
Download-Fritz
181c393670 OcAppleKernelLib: Make prelinked VTable generation safer. 2019-03-26 12:19:43 +01:00
Download-Fritz
b142f829e2 OcAppleKernelLib: Fix VTable handling of inlined definitions. 2019-03-26 12:18:28 +01:00
Download-Fritz
780777675e OcAppleKernelLib: Include non-local VTable entries when counting. 2019-03-26 09:20:17 +01:00
Download-Fritz
a9377567c5 OcAppleKernelLib: Verify Symbol is non-NULL before adding to VTable. 2019-03-26 07:10:34 +01:00
Download-Fritz
9ed4fd0181 OcAppleKernelLib: Prevent VTable patch data from overflowing LinkBuffer. 2019-03-25 20:42:07 +01:00
Download-Fritz
e455442bd2 OcAppleKernelLib: Fix inaccurate VTable patching symbol range. 2019-03-25 20:17:00 +01:00
Download-Fritz
658fe6310a OcAppleKernelLib: Fix inaccurate VTable patch data collection. 2019-03-25 20:10:43 +01:00
Download-Fritz
3907c0633c OcAppleKernelLib: Switch VTable lookup to Worker model. 2019-03-25 19:11:23 +01:00
Download-Fritz
e0309eecd4 OcAppleKernelLib: Self-scanning VTable function. 2019-03-25 19:11:22 +01:00
Download-Fritz
9884b87516 OcAppleKernelLib: Build patched VTables during prelinking. 2019-03-25 19:11:22 +01:00
Download-Fritz
ad38c49b66 OcAppleKernelLib: Ignore missing VTable resolution symbols during iteration. 2019-03-25 19:11:22 +01:00
Download-Fritz
53c59b3723 OcAppleKernelLib: Prepare new VTable patching concept.
No functional changes are intended.
2019-03-25 16:03:39 +01:00
Download-Fritz
f534cf5874 OcAppleKernelLib: Fix VTable bounds checks.
* Only iterate Parent VTables within its bounds.
* Verify Child VTable size early as due to the parent's bounds, the next iteration step might not be reached.
* Do not verify MaxSize on retrieval when the VTableData is passed to a VTable function that checks it on its own.
2019-03-25 07:34:04 +01:00
vit9696
bc0af1edee OcAppleKernelLib: Optimize hot path on vtable lookup 2019-03-24 17:32:58 +03:00
Download-Fritz
3a1cb95a6c OcAppleKernelLib: Join the VTable patching functions. 2019-03-24 13:53:05 +01:00
Download-Fritz
14bbce27ca OcAppleKernelLib: Skip previously patched VTables. 2019-03-24 13:47:23 +01:00
Download-Fritz
2d3d2997b5 OcAppleKernelLib: Fix SMCP storage. 2019-03-24 13:43:32 +01:00
Download-Fritz
896610d256 OcAppleKernelLib: Rework dependency symbol location. 2019-03-24 13:17:59 +01:00
vit9696
4d94e639ca OcAppleKernelLib: Check symbol range during vtable parsing 2019-03-24 15:11:24 +03:00