X33 - Restore image downgrade
Purpose: The result of the spike for I618I618 (closed): X33-restore-downgrade: Restore image downgrade by a compromised wb-downloadFollow-up from #262 (X30-installer-trust).. Can a compromised
wb-download install an older macOS build that Apple’s signing server
still signs for a VM, by reporting a newer version in its catalog
entry? And can wb-vmd-install read the build from the image itself,
and check it against the entry before it installs?
Requirements: SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another., SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts., SEC15-no-guest-disk-mountSEC15-no-guest-disk-mount: The host never mounts a guest-written diskA disk image is guest-written once a guest has run with it attached, and every copy or clone of a guest-written image is guest-written too.
For review
Section titled “For review”- Decides: whether the downgrade gap of S17-04-restore-and-releaseS17-04-restore-and-release: Restore Image and ReleaseThe steps by which wb-download and wb-hostd fetch and check a macOS restore image and a Claude Code release.,
“The trust base”, can be closed by checking the version that
VZMacOSRestoreImagereads from the image, as I658I658 (open): wb-hostd: accept only restore images whose SHA-256 is on the release's pinned list (B618 option B)Package IMG.2 of docs/implementation-plan.md, part 5 of 5 (IMG.2e). planned. - You are approving: the answer, no, and what it records:
- Apple’s signing server signed every VM build the spike tried, back to macOS 13.0 from 2022, and each one installed;
VZMacOSRestoreImagereads the build and the version from the image’sBuildManifest.plist, which no signature covers. A restore image of 27.0 with that file rewritten to say 27.2.1 reported 27.2.1, installed, and booted a guest that reported 27.0;- so a check of the version the image reports, in
wb-vmd-installorwb-hostd, doesn’t stop a downgrade. S17-04-restore-and-releaseS17-04-restore-and-release: Restore Image and ReleaseThe steps by which wb-download and wb-hostd fetch and check a macOS restore image and a Claude Code release. keeps it, now measured, and I658I658 (open): wb-hostd: accept only restore images whose SHA-256 is on the release's pinned list (B618 option B)Package IMG.2 of docs/implementation-plan.md, part 5 of 5 (IMG.2e). as written has nothing to build.
- Controls touched: SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another. (per-project isolation)
rests on the guest OS, and a compromised
wb-downloadcan make that OS an old build with known flaws. The spec already said so, and the result shows how old. No control is weakened. SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts.: unchanged, the spike adds no rule. - Assumed:
- that Apple’s signing server keeps signing these builds. It answered on 2026-11-28, and can stop at any time;
- that the guest’s own
sw_verscan’t be changed the same way. The system volume is checked by the restore OS while it copies it (X30-installer-trustX30-installer-trust: Installer refusal of a changed restore imageDoes the Virtualization framework's macOS installer, run by wb-vmd-install, refuse a restore image that Apple didn't sign, or one with a changed or replaced component, and does the install contact Apple while wb-vmd-i…), and c04’s guest reported its true build. The spike didn’t try to change the system volume’sSystemVersion.plist, which X30-installer-trustX30-installer-trust: Installer refusal of a changed restore imageDoes the Virtualization framework's macOS installer, run by wb-vmd-install, refuse a restore image that Apple didn't sign, or one with a changed or replaced component, and does the install contact Apple while wb-vmd-i… shows fails the install.
- Open decisions: what stops a downgrade, if anything. The options are in B618-restore-downgradeB618-restore-downgrade: Can a compromised wb-download install an older macOS build?Yes, and the image's own version can't stop it.. The spec keeps the gap until the maintainer decides.
Question
Section titled “Question”From I618I618 (closed): X33-restore-downgrade: Restore image downgrade by a compromised wb-downloadFollow-up from #262 (X30-installer-trust).: which older macOS builds does Apple’s signing server still
sign for a VM, measured by installing from them? Can the build version
that VZMacOSRestoreImage reads from the image be changed without the
install failing? If it can’t, wb-vmd-install could check it against
the entry before it installs, and stop a downgrade.
Answer
Section titled “Answer”No. The image’s own version doesn’t stop a downgrade:
- Old builds install. Every Apple restore image the spike tried installed, from 27.2 (superseded 19 days before) back to 13.0 (from 2022). The signing server answered each install’s five requests.
- The version the image reports can be changed.
VZMacOSRestoreImage.buildVersionandoperatingSystemVersioncome from the image’sBuildManifest.plist. No signature covers the file, and the install didn’t refuse changed version strings in it. Apple’s 27.0 (26A428) image with them rewritten to 27.2.1 (26B131) reported 26B131 and 27.2.1, installed in 144 s, and booted a guest that reported 27.0 (26A428).
A plain lie in the entry, with Apple’s image unchanged, would be caught
by comparing the entry with what VZMacOSRestoreImage reports. An
attacker who controls wb-download writes the file too, so they
rewrite the manifest and report its SHA-1, and that comparison passes.
What does tell the truth is the guest. The system volume is the part
of the image the restore OS checks (X30-installer-trustX30-installer-trust: Installer refusal of a changed restore imageDoes the Virtualization framework's macOS installer, run by wb-vmd-install, refuse a restore image that Apple didn't sign, or one with a changed or replaced component, and does the install contact Apple while wb-vmd-i…), and the
guest’s sw_vers reads that volume. A check there is one of the
options in B618-restore-downgradeB618-restore-downgrade: Can a compromised wb-download install an older macOS build?Yes, and the image's own version can't stop it., not a decision.
Measurements
Section titled “Measurements”The host is the dedicated Mac, macOS 27.2.1 (26B131), on 2026-11-28
(UTC). That day the newest restore image in Apple’s catalog was 27.2.1
(26B131), and the catalog listed no older build. The older images came
from Apple’s CDN, at the URLs of the VirtualMac2,1 listing on
api.ipsw.me, and their SHA-1s equal that listing’s. x33 is the
X30-installer-trustX30-installer-trust: Installer refusal of a changed restore imageDoes the Virtualization framework's macOS installer, run by wb-vmd-install, refuse a restore image that Apple didn't sign, or one with a changed or replaced component, and does the install contact Apple while wb-vmd-i… install tool without its sandbox profile, ad-hoc
signed with the virtualization entitlement. Each install made a new
bundle with 4 CPUs, 4 GiB and no network for the guest, one at a time.
| Case | Image | Released | VZMacOSRestoreImage reports |
Signing server | Result |
|---|---|---|---|---|---|
| c01 | 27.2 (26B123), superseded by 27.2.1 on 2026-11-09 | 2026-10-26 | 26B123, 27.2.0 | 5 responses | installed, 218 s |
| c02 | 27.0 (26A428), below the 27.0.1 floor | 2026-09-14 | 26A428, 27.0.0 | 5 responses | installed, 190 s |
| c03 | 26.0 (25A354), the previous major release | 2025-09-15 | 25A354, 26.0.0 | 5 responses | installed, 150 s |
| c04 | c02’s image, rewritten to 27.2.1 (26B131) | 26B131, 27.2.1 | 5 responses | installed, 144 s | |
| c05 | 13.0 (22A380) | 2022-10-24 | 22A380, 13.0.0 | 5 responses | installed, 126 s |
fakever.py rewrote c04’s image. It changed ProductVersion,
ProductBuildVersion and each build identity’s BuildNumber in
BuildManifest.plist, Restore.plist, the image’s top-level
SystemVersion.plist (not the one on the system volume) and the
two plists under BootabilityBundle/Restore/, and copied every other
entry unchanged. After the install, mise run vm:provision i618/c04 20
booted the bundle, and sw_vers over SSH said:
ProductVersion: 27.0BuildVersion: 26A428To find which file the version comes from, x33 info read copies of
the 27.2 image that held only the small entries, rewritten to 27.3
(26C999):
| Entries rewritten | buildVersion |
operatingSystemVersion |
|---|---|---|
| none | 26B123 | 27.2.0 |
| all five | 26C999 | 27.3.0 |
only BuildManifest.plist |
26C999 | 27.3.0 |
only Restore.plist |
26B123 | 27.2.0 |
only SystemVersion.plist |
26B123 | 27.2.0 |
The install’s log lines about the signing server, from the
Virtualization processes, are in results/<case>.tss.txt. The full
logs stay out of the branch.
Not covered
Section titled “Not covered”- Builds older than 13.0. The spike didn’t try them. 13.0 already shows that a build’s age doesn’t stop the server.
- How long the server keeps signing. One day’s answers. Apple can stop signing a build at any time.
- A changed system volume. X30-installer-trustX30-installer-trust: Installer refusal of a changed restore imageDoes the Virtualization framework's macOS installer, run by wb-vmd-install, refuse a restore image that Apple didn't sign, or one with a changed or replaced component, and does the install contact Apple while wb-vmd-i… measured that one
changed byte fails the install, so the spike didn’t try to change the
guest’s
SystemVersion.plist.
What it means for the specs
Section titled “What it means for the specs”- S17-04-restore-and-releaseS17-04-restore-and-release: Restore Image and ReleaseThe steps by which wb-download and wb-hostd fetch and check a macOS restore image and a Claude Code release., “The trust base”: the gap is measured.
The server signs VM builds back to 13.0, and the version
VZMacOSRestoreImagereports comes from an unsigned file, so it can’t replace the entry’s. The gap stays until the maintainer picks an option in B618-restore-downgradeB618-restore-downgrade: Can a compromised wb-download install an older macOS build?Yes, and the image's own version can't stop it.. - I658I658 (open): wb-hostd: accept only restore images whose SHA-256 is on the release's pinned list (B618 option B)Package IMG.2 of docs/implementation-plan.md, part 5 of 5 (IMG.2e). (IMG.2e) plans to check that version, and its own text says it is closed as not planned when the version can be changed. That is the maintainer’s call.
Spike code
Section titled “Spike code”Throwaway code on branch spike/x33-restore-downgrade, commit
0d2d9f5:
x33 (Sources/x33/main.swift, built by build.sh), fakever.py,
which rewrites an image’s version, and run-case.sh and tss.sh,
which run one install and keep the signing server’s log lines. The
numbers are in results/.
Status: Answered 2026-11-29: no. Apple’s signing server signs VM builds back to 13.0, and the version VZMacOSRestoreImage reports comes from the unsigned build manifest