From fe032e5f233fe6d9d52a53262ecc4c18be4eca77 Mon Sep 17 00:00:00 2001 From: diviocity Date: Mon, 30 Nov 2026 16:52:38 +0100 Subject: [PATCH] Verify the signed desktop boot and executable linkage --- BOOTSTRAP.md | 6 ++++++ tests/exec-linkage.py | 42 +++++++++++++++++++++++++++++------------- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index cd92ccb..da6b34e 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -62,6 +62,12 @@ At Vinix revision `7f173671`, a fresh x86_64 root installed `vinix-release-deskt To check the clean install before allocating disk space for the image, pass `--install-only` to `python3 tools/desktop-root.py "$arch" "$repo" "$auditor" "$work" "$fingerprint"`. When assembling the image later, run `python3 tools/stage-image.py "$arch" "$work/client" "$repo" "$work/image" "$auditor" "$fingerprint"` against that same audited client. +The x86_64 release kernel booted that same 70-package client from ext2 with the five checksum-pinned Vinix native programs from the November 28 release. The guest read the ext2 identity, reached the registration screen and sampled at least 24 framebuffer colors. See `foundation/desktop-cold-guest-x86-01`, receipt SHA-256 `0c5b9bfae72837102bec49cf86e6422dc133466b121d951adf2cda14e6f95a5f`. The checksum-verified disk archive and restoration metadata are in `foundation/archived-desktop-cold-disk-02`, receipt SHA-256 `463aa01ddb1ced471b0bc4dce635a660982ba7181ba6a5b8f8a454f43e35cea5`. + +The packaged musl loader relocated all 150 dynamically linked position-independent executables from that client under PRoot. The `--fixed-address-report` option of `tests/exec-linkage.py` listed 24 GCC executables separately for direct execution. The GCC guest fixture exercises compiler drivers, compiler internals and runtime libraries through C, C++ and LTO builds. See `foundation/desktop-loader-cold-x86-02`, receipt SHA-256 `5d5487ba68828b33f7e73957b14249c4b8b1ec414ae278ccbeb319d1931c001b`. + +The same client's file ownership and exported-symbol comparison against the published initramfs is in `foundation/release-roots-audit-cold-01/x86_64`, receipt SHA-256 `53c9dada6393e3608bd24bfed1f27d194271861f747b023a734ed121f2681e9b`. The comparison found full export coverage at 60 library paths, export differences at eight, and one absent provider for Alpine's `libapk`. + The worker resolved all 81 packages in `foundation/xlib-combined-01/repo` into seven stages. For example, BusyBox follows musl and Linux headers, Xlib follows XCB and Xtrans, and the bitmap fonts follow mkfontscale. The order is in `foundation/xlib-order-01/order.tsv` with SHA-256 `51d1464a0a994328c40264105f8b95b7b22a8922cad177daef98e593d4a6930c`. The first signed ARM feed puts both musl and Linux headers in stage zero. Its signed, installed root passed the ownership and ELF audit for 1,165 files and links, including six target ELFs. The worker keeps that receipt in `arm/common/sdk-01-audit.log` with SHA-256 `b315f8d20f2d4c7737fd2e5078c33e12b6183d2ee86a22a9ba6db6852d68c59b`. ## Running the shared worker diff --git a/tests/exec-linkage.py b/tests/exec-linkage.py index 355e115..efde23c 100644 --- a/tests/exec-linkage.py +++ b/tests/exec-linkage.py @@ -12,14 +12,15 @@ import tarfile import tempfile -def interpreter(path): +def executable(path): with path.open("rb") as stream: header = stream.read(64) if header[:4] != b"\x7fELF": return None if len(header) != 64 or header[4:6] != bytes((2, 1)): raise ValueError(f"unexpected ELF header in {path}") - if struct.unpack_from(" 4096: raise ValueError(f"invalid ELF interpreter in {path}") stream.seek(position) raw = stream.read(length) if len(raw) != length or not raw.endswith(b"\0"): raise ValueError(f"truncated ELF interpreter in {path}") - return os.fsdecode(raw[:-1]) + return os.fsdecode(raw[:-1]), kind return None @@ -47,11 +48,12 @@ def commands(arch, sdk): path = Path(directory) / name if path.is_symlink() or not path.is_file(): continue - loader = interpreter(path) - if loader is not None: + elf = executable(path) + if elf is not None: + loader, kind = elf if loader != expected: raise ValueError(f"unexpected interpreter {loader} in {path}") - yield [loader, "--list", "/" + path.relative_to(root).as_posix()] + yield [loader, "--list", "/" + path.relative_to(root).as_posix()], kind def release_probe(args): @@ -75,9 +77,10 @@ def release_probe(args): with program.open("wb") as out: out.write(magic) shutil.copyfileobj(member, out) - interp = interpreter(program) - if interp is None: + elf = executable(program) + if elf is None: continue + interp, kind = elf path = Path(entry.name.removeprefix("./")) if path.is_absolute() or ".." in path.parts or ":" in str(path) or "!" in str(path): raise ValueError(f"invalid guest bind path: {path}") @@ -90,8 +93,6 @@ def release_probe(args): loader, "--list", "/" + str(path)], capture_output=True, text=True) diagnostic = " | ".join(result.stderr.splitlines()) status = "failed" if result.returncode else "relocated" - with program.open("rb") as source: - kind, = struct.unpack_from("