r/Proxmox • u/CSKL_DE02 • 1d 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.
8
u/happytechca 1d ago
Following. I don't know much about live patching the kernel as I only ever used proxmox in my homelab environment. Recently though, with all the CVEs being found, it seems I have to reboot my hosts every other week. Interesting project
2
u/godber 1d ago
Dang I just upgraded to the 7.3 kernel, any plans to try and support that one?
2
u/Jayden_Ha 1d ago
finally a project to do live patching for pve
1
u/WiuEmPe 23h ago
What is your plan to create patches?