r/Proxmox • • 10d ago

Security hvpatch 0.3.0: open-source kernel livepatching for PVE 9 hosts, now including the default 7.0 kernel

I maintain hvpatch, a GPL-2.0 tool that applies kernel security fixes to

running Proxmox VE hosts as livepatches, so the VMs keep running and the

reboot can wait for the next maintenance window. It's our own project, not

a product. We use it for our own hypervisors.

GitHub: https://github.com/prepaid-host/hvpatch

How it works:

- Builds livepatch modules with the kernel's own klp-build, from the

exact source and config Proxmox shipped

- Verifies every module against the shipped kernel (symbols, CRCs) and in

QEMU with the real kernel before release

- The node agent only loads signed manifests that match the running

kernel's build-id. Rings (canary/early/stable), cluster lock via

pmxcfs, rollback, revocation list

- `hvpatch status` tells you which CVEs are fixed live and which still

need a reboot

New in 0.3.0: the default 7.0 kernel (experimental), tested with

7.0.14-30-pve on a 3-node test cluster with loaded guests:

- apply under load: 12-16 s per node, transition 1.5-5 s

- guests pinged every 100 ms: no loss, longest gap 0.11 s

- revert/re-apply, reload after reboot without the repo, concurrent apply

(second node waits for the lock), revocation

Limits: you build and sign the modules yourself for now (no prebuilt

modules yet). Not every fix can be livepatched. Livepatches bridge the

time to the next reboot, they don't replace it.

Feedback from test nodes very welcome, especially on other hardware.

73 Upvotes

13 comments sorted by

View all comments

2

u/godber 10d ago

Dang I just upgraded to the 7.3 kernel, any plans to try and support that one?

5

u/CSKL_DE02 10d ago

7.3 is supported. There's a build pipeline that picks up new Proxmox kernels on its own, and 7.3.5 and 7.3.6 already went through it. Right now there's nothing to patch on them: everything in the catalog is already fixed in those kernels. Once a fix for 7.3 lands in the catalog, a signed module shows up on the mirror within about an hour (canary ring first).

2

u/godber 9d ago

Nice! Thanks for the reply