Skip to content

fix(kernel/kmutil): handle Mach-O and IMG4 kernel collections#1107

Open
str8outtaheap wants to merge 1 commit intoblacktop:masterfrom
str8outtaheap:fix/kmutil-kernelcache-format-detection
Open

fix(kernel/kmutil): handle Mach-O and IMG4 kernel collections#1107
str8outtaheap wants to merge 1 commit intoblacktop:masterfrom
str8outtaheap:fix/kmutil-kernelcache-format-detection

Conversation

@str8outtaheap
Copy link
Copy Markdown

On systems where GetKernelCollectionPath() returns a Mach-O .kc (for example x86_64), commands now parse Mach-O first instead of failing early on IMG4 ASN.1 detection, while preserving the existing IMG4 flow for actual IMG4 inputs.

Summary

  • add a shared kernel collection loader for kmutil commands
  • detect Mach-O first and only check IMG4 as fallback
  • reuse this loader in kernel kmutil inspect and kernel kmutil create
  • remove duplicated format-detection/opening logic that existed in both commands, so behavior stays consistent
  • add tests to lock in Mach-O-first behavior and IMG4 fallback

Related #1081.

@github-actions
Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant