Repository navigation
fix(vm): record kernel provenance in runtime tarballs - #4650
Conversation
Record the kernel config hash, and pass libkrunfw commit and kernel version to the macOS runtime. Signed-off-by: Eric Curtin <eric.curtin@docker.com>
|
@TaylorMutch @SDAChess PTAL, and |
|
@TaylorMutch @SDAChess PTAL, and |
|
@alangou @johntmyers PTAL when you get a chance, and |
|
@sjenning @derekwaynecarr PTAL when you get a chance, and |
|
@mrunalp @matthewgrossman PTAL when you get a chance, and |
|
/ok to test 1660959 |
There was a problem hiding this comment.
Validated commit 16609599121d00408aab95668a46b6d072f6803e with a real Linux ARM64 → macOS ARM64 build and runtime smoke test.
- Built the pinned libkrunfw kernel and libkrun on a fresh Ubuntu 24.04 ARM64 GCP VM using this revision's
build-libkrun.sh. - Confirmed the final kernel config enables
CONFIG_SECURITY=y,CONFIG_SECURITY_LANDLOCK=y, andlandlockinCONFIG_LSM. Independently hashed the final.configand verified the producer's metadata and packaged Linux metadata against it. - Transferred the actual
kernel.c,ABI_VERSION, andprovenance.jsonto an Apple Silicon Mac. Built the native dylibs with this revision's unchangedbuild-libkrun-macos.sh, then packaged them withCUSTOM_PROVENANCE_DIRpointing to the transferred metadata, matching the workflow's handoff. - Verified the Linux and macOS tarballs both contain these same correct values:
libkrunfw_commit: f14ac64ca8a04c6c9d76cac1c61ee050809c88c9
kernel_version: linux-6.12.109
kernel_config_sha256: 7622bbd5777c3253b5e4ab263d861a4890301935a7e5444696d1d3a02c4f6baf
Booted the newly built macOS runtime using the published v0.1.4 gateway/VM driver with the new runtime libraries explicitly selected:
- Guest: Linux 6.12.109 aarch64; direct Landlock version query returned ABI 6, errno 0.
- Sandbox reached Ready with
landlock.compatibility: hard_requirementand existing policy paths. - As sandbox UID 1000, read/write under declared
/tmpsucceeded. Writing to undeclared, world-writable/var/tmpfailed with EACCES.
This supplies the targeted provenance and macOS runtime evidence for #3095. The artifact transfer was performed manually; this did not dispatch or publish through the release workflow. Native build helpers used an explicit Xcode libclang search path.
Required PR checks passed for this head. The general E2E and GPU suites were not opted in; the real-build and runtime checks above were run separately. Approved.
Summary
The runtime tarball provenance lacked the kernel config hash, and the macOS tarball reported
unknownfor libkrunfw commit and kernel version. The Landlock kernel config already landed in #2942.Related Issue
Closes #3095
Changes
build-libkrun.shwritesprovenance.jsonwith libkrunfw commit, kernel version and final.configSHA-256.package-vm-runtime.shreads it (one helper replaces the Linux-only fallback) and addskernel_config_sha256.kernel.c.Testing
Ran shellcheck,
bash -n, markdownlint, and the packaging script on fake Linux, macOS and missing-provenance inputs. The workflow isworkflow_dispatchonly, so it is not exercised here. The published rolling runtime kernel already contains Landlock.Checklist