Repository navigation
Trusted darwinOS & Cryptexes: Full Version Support - #932
Merged
Merged
Conversation
DyldSharedCache reads an arm64e cache and its subcaches (slide info v5), and DyldCacheDylibExtractor rebuilds one image as a loadable MH_DYLIB: segments keep their address modulo 4 KiB, slide pointers become chained fixups with their PAC schema, calls into other images or stub islands go through new auth stubs, coalesced GOT accesses through new GOT slots, the unwind personality gets a slot of its own, and __LINKEDIT is rebuilt. It is what lets the kmutil of another macOS run here with that release's libKernelCollectionBuilder.dylib (DYLD_LIBRARY_PATH), which only exists inside the shared cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iOS 27 kexts call the kernel's strcmp, which lives in __bootcode (__TEXT_BOOT_EXEC), through their auth stubs. KernelCollectionStubCalls only took targets in __TEXT_EXEC and refused the 27.2 mix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A kernel boots only in the layout its builder gave it, and every kernelcache names that builder (_PrelinkKCID, KernelManagement_host-X). KernelCollectionToolchain takes this Mac's kmutil when it is that version, else the kmutil of the macOS release that ships it, read once out of that IPSW's recoveryOS with range requests, with libKernelCollectionBuilder lifted out of its shared cache. Releases are checked against the bases: 463.40.2 (macOS 15.1, iOS 18.1-18.3.1), 463.100.7 (15.6.1, 18.5-18.7.2), 487.100.11 (26.5, 26.4-26.7, watch, HomePod), 514.40.8 (27.2.1, 27.2). libvphone-kmutil-shim.dylib, built into the bundle, shows kmutil the user's files as root's and gives it its own release's KernelManagement configuration (macOS 15's kmutil traps on the 26+ one), so `fw kernelcache` stages and links without sudo on any macOS. Root only reads a mix from the cache and never runs the toolchain. The ssh builder (VPHONE_KMUTIL_SSH) and the root link are gone, and the catalog reports no kernel-first device. `fw kernelcache --kernelcache <file>` mixes a kernelcache without a VM. The mix revision is 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Core Bundles from this change link every kernelcache mix themselves, with the kmutil the base names, and no longer report kernel-first devices, so New Machine's macOS builder fields, `vm create --kmutil-ssh` and the password forwarding of vphone-launchpad-cli go. The helper link after "[+] Staged." stays for 2.17 bundles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From iOS 27 on, restored takes its "fast mtree path": it skips mtree -m and writes MODIFICATION from the root entry's time, cut to whole seconds, whatever was edited after it. Every 26.x restore logged "Fast mtree path not enabled", 27.2's "enabled", and the host sends no option for it. Seal with that time from iOS 27 on, or apfs_sealvolume's digests do not match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cloudOS 27's app entries gained a field before the name, so the part offsets lie 0x80 bytes before it instead of 0x78. Try both distances and take the one whose first part starts with a Mach-O header. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
iBoot loads its link address with ldr x1, =base, its third instruction. The literal sat at 0x300 up to iOS 26; iOS 27 moved it to 0x380 and put the version string at 0x300, so the OpenAVB identity refused the 27.2 iBSS. Follow the LDR, keeping 0x300 as the fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… data
The descriptor transport has a fifth operation, SET_HAS_DATA, the twin of
the MMIO path's HAS_DATA bit. AVPBooter sends it after every write;
OpenAVB did not, so a written request read back as empty. iBoot up to
iOS 26 read the request without asking. The iOS 27 LLB asks HAS_DATA
first and panicked ("iBoot Panic: 368a9bee26e56b8:73"). With the patch it
logs the same lines as under AVPBooter and the kernel boots.
The image is rebuilt by UpdateOpenAVB.sh from the pinned commit plus
patches/0001-entropy-descriptor-set-has-data.patch, which also updates
OpenAVB's transport test model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The macOS 27 kmutil writes x16, the start of the kernel's __TEXT_EXEC,
into an iOS 27 collection's LC_UNIXTHREAD. A standalone kernel has none,
and kmutil refuses one that keeps the collection's address ("LC_UNIXTHREAD
entry is out of range"): clear it along with remapping pc.
Also test that an auth stub into __TEXT_BOOT_EXEC becomes a direct branch.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A research board kernelcache for iOS 27.2 (24B119): cloudOS 27.2 seed 24B115's kernel (24B112) with the vphone600 26.4 (23E5207q) donor kexts, linked by the macOS 27.2.1 kmutil. Every donor import resolves; the metaclass and vtable imports were checked against the base's OSMetaClass constructors. The catalog offers cloudOS 27.2 as a research board cloudOS and pairs iOS 27.2. HomePod keeps cloudOS 26.4 for releases without a HomePod recipe, now that 27.2 has a research board cloudOS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cryptexctl 18.6's install --print-info prints nothing, so persist failed with "installed, but not kept: cryptexctl named no identifier" and the cryptex was gone after a reboot. Take the identifier from the .cxbd itself (CFBundleIdentifier in Restore/Cryptex/<id>/ginf) and fall back to the first line of --print-info. Checked on iOS 18.6 / cloudOS 18.6: two cryptexes kept, back after a reboot, uninstalled, no panic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The iOS 27 refusal came from iOS 27.0.1 on cloudOS 26.4, a pairing that boots cloudOS 26.4's TXM under iOS 27 binaries: only standard's TXM patches make it boot, and minimal leaves TXM stock. iOS 27.2 with cloudOS 27.2 restores in environment 6, boots, and installs, keeps across a reboot and uninstalls cryptexes. The manual now asks for iOS and cloudOS of the same release, and the research note lists the 13 pairings checked on 2026-11-13 and 14, from iOS 18.1 to 27.2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on
feature/kc-recipe-27.2#931. Only the last two commits belong to this PR; the other ten come from those branches.Related to #900
Changes
1. Keep cryptexes on iOS 18 (
Keep cryptexes on iOS 18, whose cryptexctl prints no identifier)cryptex.installwithpersist: truetook the cryptex identifier from the first line ofcryptexctl install --print-info. cryptexctl 26.5 prints the identifier there, but cryptexctl 18.6 prints no identifier. So on iOS 18 the cryptex was installed but not kept ("installed, but not kept: cryptexctl named no identifier"), and it was gone after a reboot. vphoned now reads the identifier from the.cxbditself:CFBundleIdentifierinRestore/Cryptex/<identifier>/ginf. It falls back to the cryptexctl output.2. Allow trusted darwinOS on iOS 27 (
Allow trusted darwinOS on iOS 27, whose own cloudOS boots it)This reverts
trustedDarwinOSRefusal(f1c0268). The refusal was based on iOS 27.0.1 with cloudOS 26.4. That pairing runs cloudOS 26.4's TXM (187.100.3) under iOS 27 binaries, which TXM rejects (txm_selector24_cms_gate.md). Onlystandard's TXM patches make that pairing boot, andminimalleaves TXM stock. So the panic tells us about the pairing, not about iOS 27 in trusted darwinOS. iOS 27.2 with cloudOS 27.2 boots in environment 6 and runs cryptexes.machines/cryptexes.md, en/ja/ko/zh): says to pair iOS with the cloudOS of the same release, and lists the versions checked.trusted_darwinos_cryptexes.md): keeps the 27.0.1 panic log with the explanation above, and adds the table below.0_binary_patch_comparison.md: the entry is rewritten to match.Testing
Each pairing below was a new machine (
vm create --preset minimal --allow filesystem-exp-trusted_darwinos --no-template). Each went through the same steps:Ap,OSEnvironment = 6, and the first boot reported libignitiontrusted-darwinos.persist: true: a shell script, read back, and a launch daemon answering on TCP 7070.system.reboot, both were mounted again as soon as vphoned answered, and the daemon ran with a new pid.cryptex.uninstallof both, nothing was listed or kept.No machine logged a panic.
¹ These first boots logged no kernel output, so no libignition line. The restore requested environment 6, and cryptexd accepted the cryptexes.
feature/portable-kmutil. iOS 18.6 failed to keep its cryptexes without the persist fix, and kept them with it.FirmwarePatcherTestshas no failures related to this change. The ones that fail need local IPSW fixtures.