Skip to content

Releases

hvpatch 0.2.1

Choose a tag to compare

@github-actions github-actions released this 24 Nov 13:40

From an independent review of the whole code base. It found no way to get
unverified code loaded, but three faults in failure handling that made each
other worse; they are fixed here.

Fixed

  • Kernel log check could be triggered by tenants. Any line containing
    "general protection fault" or "BUG:" backed a patch out, including a
    crashing user process ("traps: …", info level) or a process named "BUG:".
    Only records the kernel itself logged at warning level or worse count
    now, and only if the message starts with a known marker; taint flags stay
    the primary signal.
  • Failed levels were retried every hour, and a level that crashed the
    host would have been loaded again after every reboot. Loads are recorded
    before they start; a level that fails or whose load is interrupted is
    quarantined by module hash. The timer and the boot reload skip it (the
    boot reload falls back to the highest cached level below it); an
    explicit apply retries it.
  • Restoring the previous level left the node without a livepatch for
    up to the transition timeout. The previous level is now loaded again
    while the failed one is still active, which replaces it atomically.
  • A run interrupted after a completed transition is recognised and
    recorded as active instead of reporting "in progress" forever.
  • Every error after a manifest was accepted (download, disk full, …) is
    recorded as failed with its reason.
  • Hooks: run like run-parts (no *.dpkg-old, no dotfiles), with a timeout
    (hook_timeout, killed with their process group), only if owned by root
    and not writable by others, with HVPATCH_MODE = apply, boot or restore.
  • The boot unit is no longer restarted by package upgrades, has the same
    sandbox as the timer unit, and waits for a running timer instead of
    failing (boot_lock_wait).
  • A livepatch being freed by the kernel (sysfs gone, reference not yet
    dropped) is no longer mistaken for a forced one.
  • Read errors in sysfs other than "not found" are errors, not a finished
    transition. Transition timeouts count wall-clock time.
  • A node clock behind the build time no longer blocks the boot reload
    (warning instead).
  • One damaged file in trusted.d is skipped with a warning instead of
    stopping every command. A damaged state.json names the way out.
  • State writes fsync the directory; the module size limit is 32 MiB; the
    cache keeps three levels per kernel and forgets old kernels;
    setup --key https:// refuses redirects to http; repositories answering
    403 for missing files (S3) count as "not published"; a manifest whose
    signature does not match is fetched once more before failing (publish
    race).
  • Manifests must be bound to a kernel build-id; hvpatch-tool manifest
    requires --build-id.

Added

  • Cluster-wide lock in pmxcfs: in a Proxmox VE cluster only one node loads
    a livepatch at a time; without quorum nothing is loaded
    (cluster_lock).
  • Timer policy: delay_hours (delayed channel) and pin_level.
  • /run/hvpatch/effective_version and fixed_cves for vulnerability
    scanners.
  • Warning (or refusal with refuse_on_trace_conflict) when kprobes or BPF
    programs are attached to a function the livepatch replaces.
  • status lists quarantined levels; metric hvpatch_quarantined.

Changed

  • Catalog review: one approval is required while the project has a single
    maintainer (was two). Documented in CONTRIBUTING.md and
    catalog/README.md; it goes back to two with a second maintainer.

Install

wget https://github.com/prepaid-host/hvpatch/releases/download/v0.2.1/hvpatch_amd64.deb
apt install ./hvpatch_amd64.deb
hvpatch setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify hvpatch_amd64.deb --repo prepaid-host/hvpatch

hvpatch 0.2.0

Choose a tag to compare

@github-actions github-actions released this 24 Nov 08:12

Changed

  • Renamed from pve-klp to hvpatch. "pve" is the prefix of Proxmox's own
    packages, and a third-party tool should not look like one. Everything
    follows the new name:

    Before Now
    pve-klp, pve-klp-tool hvpatch, hvpatch-tool
    /etc/pve-klp/pve-klp.toml /etc/hvpatch/hvpatch.toml
    /var/lib/pve-klp /var/lib/hvpatch
    pve-klp-boot.service, pve-klp-auto.timer hvpatch-boot.service, hvpatch-auto.timer
    PVE_KLP_* (hooks, PVE_KLP_CONFIG) HVPATCH_*
    metrics pve_klp_*, pve_klp.prom hvpatch_*, hvpatch.prom
    modules klp_pve_<kernel>_p<N> klp_hvp_<kernel>_p<N>
    builder image pve-klp-builder hvpatch-builder
    github.com/prepaid-host/pve-klp github.com/prepaid-host/hvpatch (old URLs redirect)

Upgrading from pve-klp

  • The hvpatch package conflicts with and replaces pve-klp. Installing it
    removes pve-klp and copies, once, the configuration (paths rewritten),
    trusted keys, hooks, module certificate, state (including the
    anti-rollback history) and module cache. An enabled auto timer stays
    enabled. CI runs this takeover on every change.
  • A livepatch loaded by pve-klp (klp_pve_*) stays active and counts as
    hvpatch's own: status shows it, and the next level replaces it without
    --replace-foreign.
  • Manifest keys generated by pve-klp-tool keygen keep working.
  • Update monitoring (metric names, textfile name) and Ansible (package,
    command and unit names).
  • The builder's build identity changes to hvpatch@hvpatch-builder, so the
    first build per kernel rebuilds the cached original once.

Install

wget https://github.com/prepaid-host/hvpatch/releases/download/v0.2.0/hvpatch_amd64.deb
apt install ./hvpatch_amd64.deb
hvpatch setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify hvpatch_amd64.deb --repo prepaid-host/hvpatch

pve-klp 0.1.6

Choose a tag to compare

@github-actions github-actions released this 24 Nov 07:13

Build-side fixes from the sixth real-host round, which confirmed 0.1.5 and
ran resolve --tree with the first real catalog entries (PR #4) against the
Proxmox 7.3.4-1 and 7.3.5-1 trees. The agent is unchanged.

Fixed

  • resolve --tree with a relative --catalog (including the default
    catalog) reported every patch as "does not apply": git resolved the
    patch path against the tree. Catalog paths are now absolute.
  • The in-order check wrote into the tree's .git and failed on read-only
    trees (:ro mounts, shared caches), reported as an ordering conflict.
    Index and new objects now go to a temporary directory and the tree's
    objects are only read; I/O problems are reported as such, not as
    conflicts.

Docs

  • --allow-conflicts only covers patches that do not fit the kernel.
    Patches that conflict with each other are a catalog defect and always
    fail (help text and catalog/README.md).

Install

wget https://github.com/prepaid-host/pve-klp/releases/download/v0.1.6/pve-klp_amd64.deb
apt install ./pve-klp_amd64.deb
pve-klp setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify pve-klp_amd64.deb --repo prepaid-host/pve-klp

pve-klp 0.1.5

Choose a tag to compare

@github-actions github-actions released this 24 Nov 06:54

The fifth real-host round confirmed 0.1.4: a non-interactive upgrade from
0.1.3 on a node that ran setup, the pending MOK state, and a full kernel
build with the 0.1.4 image whose module is bit-identical to the 0.1.2-era
build of the same catalog.

Fixed

  • A failed module load quoted every kernel log line since the load, e.g.
    an unrelated softdog message after a Secure Boot rejection. Only lines
    about the module, livepatch, signatures and lockdown are kept.

Added

  • resolve also checks that the catalog patches apply together, one after
    another in catalog order (on a throwaway git index), not only each on its
    own. Two fixes in the same function could otherwise first fail inside
    klp-build.
  • builder/run.sh checks free space before it starts (60 GB, 15 GB with a
    cached tree; MIN_FREE_GB overrides) instead of failing after an hour.

Docs

  • Obsolete conffile on nodes installed with 0.1.3 or earlier, and the
    leftover pve-klp.toml.dpkg-dist from nodes that hung at the prompt.

Install

wget https://github.com/prepaid-host/pve-klp/releases/download/v0.1.5/pve-klp_amd64.deb
apt install ./pve-klp_amd64.deb
pve-klp setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify pve-klp_amd64.deb --repo prepaid-host/pve-klp

pve-klp 0.1.4

Choose a tag to compare

@github-actions github-actions released this 23 Nov 22:32

Fourth round from the real-host test, which also ran a guest VM under load
during 10 revert/apply cycles, a patched module object that is loaded only
after the boot reload, and anti-rollback across kernel releases and wrong
build-ids.

Upgrade note

Nodes that ran pve-klp setup on 0.1.3 or earlier may be stuck in a
half-configured state ("iU") after a non-interactive upgrade to 0.1.3. Run
once:

dpkg --force-confold --configure pve-klp

and then upgrade to 0.1.4. From 0.1.4 on, upgrades never prompt.

Fixed

  • Upgrades prompted (and failed without a TTY) on every node that ran
    setup, because /etc/pve-klp/pve-klp.toml was a dpkg conffile that
    setup edits. The package now ships the template as
    /usr/share/pve-klp/pve-klp.toml and creates the config only when it is
    missing; existing configs are kept. CI installs 0.1.3, runs setup and
    upgrades without a TTY on every change.
  • Running setup again without --ring reset the ring to stable. Options
    that are not given now keep the configured value; setup prints each
    value and whether it changed. --repository is only required the first
    time.

Changed

  • check and mok enroll recognize a pending MOK enrollment ("confirm in
    MokManager on the next boot") instead of saying "not enrolled".
  • status only asks for a reboot when a transition could neither complete
    nor be reversed. After a cleanly backed-out apply it suggests running
    pve-klp apply again; the exit code stays 20.
  • sign-manifest.sh runs the new pve-klp-tool check-manifest, which
    compares the manifest with the module, the resolved catalog and
    qemu.ok (kernel, module hash, build-id) and refuses to sign an edited
    manifest.

Install

wget https://github.com/prepaid-host/pve-klp/releases/download/v0.1.4/pve-klp_amd64.deb
apt install ./pve-klp_amd64.deb
pve-klp setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify pve-klp_amd64.deb --repo prepaid-host/pve-klp

pve-klp 0.1.3

Choose a tag to compare

@github-actions github-actions released this 23 Nov 21:23

Third round from the real-host test, which added a stalled transition
(apply and revert), Secure Boot with MOK enrollment under OVMF, legacy BIOS,
and three backported CVE fixes on 7.3.4-1-pve (in vmlinux and in the
overlay module) verified with a reproducer before, during and after the
livepatch.

Fixed

  • check never detected Secure Boot: the EFI global variable GUID was
    wrong (…-e098032b8c4c instead of …-00e098032b8c). It now reports
    Secure Boot and fails when the module certificate is not enrolled, so
    setup no longer says "all checks passed" on such hosts.
  • An apply whose stalled transition was reversed automatically was stored
    as reverted and status returned 0. It is now failed (exit 20), like
    other failed applies; reverted stays reserved for the operator's
    revert.
  • Builder image: rustfmt from trixie-backports (matching rustc 1.94.1),
    so the kernel build no longer warns about it.

Added

  • status notes a livepatch module of ours that is still loaded but unused
    (e.g. after a stalled revert that the kernel finished later) and how to
    remove it.

Changed

  • make builder-image adds the musl target with rustup; documented in
    docs/self-hosting.md.
  • Docs: mok enroll needs a terminal; hooks timing in the config template;
    7.3.4-1-pve in docs/toolchains.md.

Install

wget https://github.com/prepaid-host/pve-klp/releases/download/v0.1.3/pve-klp_amd64.deb
apt install ./pve-klp_amd64.deb
pve-klp setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify pve-klp_amd64.deb --repo prepaid-host/pve-klp

pve-klp 0.1.2

Choose a tag to compare

@github-actions github-actions released this 23 Nov 16:08

Second round from the real-host test (PVE 9.2, 7.3.5-1-pve). That test
confirmed the 0.1.1 fixes, the QEMU stage (7 s with KVM, including the
replacement of the previous level), atomic replace of level 1 by level 2,
restore of level 1 after a failing hook, anti-rollback after revert,
hooks, and 10 revert/apply cycles under full CPU load without kernel
warnings.

Fixed

  • build.sh: a level-2 build reusing the cached original build failed with
    "changed data: linux_banner", because the banner contains the random
    container host name. Build user and host are now fixed
    (pve-klp@pve-klp-builder), and the cache carries a stamp of config,
    toolchain and build identity; a cache without a matching stamp is rebuilt
    once.
  • build.sh: fetches the shipped packages again when any artifact the later
    stages need is missing, not only the config (workdirs from 0.1.0 lacked
    vmlinuz).
  • status: right after a reboot, before the boot unit has reloaded the
    livepatch, the phase is pending instead of the stored active.

Changed

  • On hold after revert, the timer returns immediately without contacting
    the repository. An explicit apply still evaluates it.
  • Docs: hooks run after apply and the boot reload, not after revert;
    systemd's LSB names for the exit codes; the module's own O taint.

Install

wget https://github.com/prepaid-host/pve-klp/releases/download/v0.1.2/pve-klp_amd64.deb
apt install ./pve-klp_amd64.deb
pve-klp setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify pve-klp_amd64.deb --repo prepaid-host/pve-klp

pve-klp 0.1.1

Choose a tag to compare

@github-actions github-actions released this 23 Nov 14:15

Fixes from the first run on a real Proxmox VE 9.2 host with kernel
7.3.5-1-pve. There, build, Gate A, signing, setup, apply, revert and
the reload after a reboot worked after manual workarounds; this release
removes the need for them. The new QEMU stage has not run on real hardware
yet.

Fixed

  • Agent: the first apply after boot failed with "kernel gained taint flags
    O" on hosts without ZFS loaded. klp-build modules are out-of-tree, so the
    module's own O (with K and E) is now expected; other new flags still
    fail.
  • Agent: status returns 20 while the boot reload is in progress (it
    returned 0). Text and --json output share one exit code, covered by
    tests for every state.
  • Builder image: real base image digest, http snapshot sources (no CA
    certificates yet at that point), the Debian security snapshot,
    trixie-backports on its own snapshot for the kernel's rustc/LLVM pair,
    the Proxmox repository for the shipped kernel packages, and gawk for
    klp-build.
  • build.sh: no more doubled release suffix (7.3.5-1-pve-1-pve+); a stale
    localversion-pve from 0.1.0 is removed.
  • build.sh: the patched functions are read from klp-build's diff.log
    (they were always empty before, so Gate A skipped the check silently). An
    empty list stops the build.
  • lint: an empty psa, mitigation or fixed_in_pve means "none".

Added

  • Gate A and manifest require the module's patched functions to equal the
    reviewed functions of the catalog entries, in both directions.
    functions is now required for livepatchable entries.
  • builder/qemu-test.sh: boots the shipped kernel in QEMU, loads, replaces,
    unloads and reloads the module, compares functions and build-id, and
    writes qemu.ok. sign-manifest.sh refuses to sign without it.
  • builder/run.sh and make builder-image: build and test a module with one
    command; the builder image id is recorded in the manifest.
  • docs/toolchains.md: compiler and snapshot values per kernel release.
  • Release workflow dry run (workflow_dispatch).

Install

wget https://github.com/prepaid-host/pve-klp/releases/download/v0.1.1/pve-klp_amd64.deb
apt install ./pve-klp_amd64.deb
pve-klp setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify pve-klp_amd64.deb --repo prepaid-host/pve-klp

pve-klp 0.1.0

Choose a tag to compare

@github-actions github-actions released this 23 Nov 11:20

First public preview. The agent and the build tooling are complete and
tested against an emulated kernel; loading a module on a real Proxmox 7.3
kernel is the next milestone, and no livepatch modules are published yet.
Use on test hosts only.

Added

  • Node agent pve-klp with setup, check, status, apply, boot,
    revert, auto and mok.
    • Verifies manifest signature (minisign), kernel release, vmlinux
      build-id, ring, expiry and module hash before loading.
    • Anti-rollback across revert; hold after revert until the next
      explicit apply.
    • Loads via finit_module, watches the transition per thread, reverses a
      stalled transition and never uses force.
    • Post-checks for kernel log, taint, patched functions and hook scripts;
      on failure the previous level is restored from cache.
    • Refuses to run next to foreign or force-transitioned livepatches.
    • status --json, Prometheus textfile metrics and stable exit codes.
  • Build tool pve-klp-tool: config and toolchain gate, catalog lint (with
    git patch-id comparison) and resolution, Gate A against the shipped
    kernel, manifest creation, ring promotion, minisign-compatible signing.
  • Builder container and pipeline scripts for the proxmox-kernel 7.3 series.
  • Debian package with systemd units, man page and bash completion.
  • Release workflow with static binaries, SHA256SUMS and build provenance
    attestations.

Install

wget https://github.com/prepaid-host/pve-klp/releases/download/v0.1.0/pve-klp_amd64.deb
apt install ./pve-klp_amd64.deb
pve-klp setup --repository <your repository> --key <manifest key>

Verify

sha256sum -c SHA256SUMS --ignore-missing
gh attestation verify pve-klp_amd64.deb --repo prepaid-host/pve-klp