Security testing patch repeatedly failing verification during heads boot

The package xen-4.19.6.gz repeatedly fails checksum verification by heads, even after the checksum has been updated. This issue can be resolved by running the re-ownership process within heads.

Should this be noted as part of the standard test process?

I dont know what that image was intended to add.

This seems like a Heads issue rather than a Qubes issue.
Have you been able to resign in the past? According to the docs the only
time you should need to do more than update the checksum is in the event
of dom0 upgrade.

I never presume to speak for the Qubes team. When I comment in the Forum I speak for myself.

Sure, almost every patch and process never fail such way.

As I understand the sum-recheck process in Heads.
The sum-recheck process in Heads is designed to verify only a previously known set of files base on file type, directory and maybe something more. While xen-4.19.6.gz under /boot falls outside the trusted set and limits of sum-recheck process.

While re-ownership process fully reset “the trusted set”, so it accept xen-4.19.6.gz after all.

I saw this issue a few months ago when a Xen package was replaced. As far as I know, deleting one of the kexec files in /boot of dom0, where the hashes are stored, should fix this. After that, it should be possible to regenerate them. Unfortunately, I don’t remember the exact file name anymore. I think it was kexec_hashes.txt, but I am not sure.

There is also an issue currently on GitHub about this:

If I understand it correctly, this bug is caused when Xen is replaced. The old file name appears in that list, and it cannot be signed since it doesn’t exist anymore.

And there is also a different way to solve this issue. The users in the Nitrokey forum say they created a file with that name so Heads can sign that file:

In the GitHub Issues of Heads they say the same:

Having reviewed the hack solution and the related code issue, I’d rank the hack as the worst option.
Modifying files in /boot by hand is a risky process and should be avoided whenever possible.

The reownership process is preferable, since it carries a lower risk of introducing further technical issues.

That bug was fixed at https://github.com/linuxboot/heads/pull/2150 (merged 2026-07-08, YYYY-MM-DD).

It is a Qubes OS “bug” in the sense that Xen is the only deployed boot binary that does not leave the old version in place when deploying a new version, and does not leave old versions in a grub.cfg rollback boot entry in case anything goes wrong with the newly deployed version.

When updating the kernel and initramfs, the OS is in charge of keeping X old boot entries and cleaning them up once X is reached, deleting the old versions as part of system-update cleanup, adding newest “default” boot entry on top of grub.cfg and “throttling” entries down to oldest boot combination of Xen+kernel+initramfs.

Xen is different from the Qubes OS standpoint vs kernel+initramfs bundled boot binaries managed by kernel managed rpm (dnf managed+ initramfs update hooks), and always has been:

  • Same upstream major and minor version: overwrite the Xen binaries in place (bug not triggered).
  • Newer upstream version to deploy: add the new binary and remove the old one.

The change history is under the merged PR, while a new bug was discovered after the fact. It has lesser impact, but is being worked on, was tested, and will most probably be merged today.

The issue here was a testing fiasco and was never supposed to happen to production systems deployed in the field. The Qubes OS team has numerous Heads-certified products, all of which should have caught this through QA testing before the Xen binaries were bumped for a Xen major version bumps, impacting purchased products that were supposed to be certified and tested.

I understand that Qubes OS does not want to change its ways, but once again, they do not follow best practices in terms of replacing Xen binaries in place, or deleting old ones while deploying newer ones in the case of newer Xen upstream releases.

When it comes to Qubes OS certification, firmware versions deployed are supposed to work as they are for a year after their certification. So, if Qubes OS changes its distro signing key or bumps Xen versions upstream, it should be tested as working before landing in “stable” repositories. That failed multiple times and there is not much I can do alone about this. This should be tested and coordinated if firmware versions staying on customers laptops in some times will not be updated for the next year..

What I mean to say here is that automated testing (Dasharo + Heads), Qubes OS QA, and I should have caught this before users updating from “stable” QubesOS repos as part of “update normally” guidance. And even if I fix things upstream under Heads, the fixes won’t land automagically for users.. It was not the case, unfortunately, and for that I am sorry. It was partly a bug inside of Heads because, previously, it was not properly dealing with binaries changing in place. Then it did, but no Xen version bump happened in the timeline. Then, deployed firmware triggered prior fixes not catching a binary that changed in place (which should not be part of /boot digests, but was still part of a default boot entry whose files were “tampered with” by replacing it in place).

So TLDR: Op picture is right: “tampering occured”. A file that was expected to exist (Xen older version from Heads standpoint) was savagely deleted while Heads signed digests still expects it to exist. Heads internal management failed to changed to say “hey, /boot hashes changed, was it you?” because relaying on prior digests. This changed under https://github.com/linuxboot/heads/pull/2150 . Then valid default boot hashes still (master as of today) failed to prevent user from selecting a new boot default before booting it (warned user in telling it that default boot entries changed even if /boot global hashes were validated) which lead user to open `kexec_default_hashes.txt` may get outdated · Issue #2247 · linuxboot/heads · GitHub which i’m now fixing docs to finally merge default boot: gate the saved default entry on its own hashes (fix #2247) by tlaurion · Pull Request #2255 · linuxboot/heads · GitHub

Sorry for using different ways of saying the same things, but people still don’t seem to understand what Heads does and why its workflow changed to guide users. But if ecosystem don’t follow best practices, quirks are not just magically implemented to work around them. That’s my mea culpa, folks. But, no, I won’t take all the blame that should be shared, anymore.


After all, why pay a prime for tested firmware, certified QubesOS products, subscriptions fees supposed to gate firmware and updates from impacting certified products with extended QA (i’m getting a really small percentage here from the paid subscription) if all gates fail anyway at the end and users can’t update to fixed firmware when bugfixes are needed… And updating to QubesOS “stable” channel updates fail them in the sense that they doubt of the integrity of the system supposed to prevent exactly this.

A reminder that i’m still wating that we implement (as an collaborating ecosystem), at the benefit of users, what was discussed in recorded, and agreed plan on QubesOS 2024 mini-summit’s talk Heads rolling release : roles of upstream and downstream forks (Design Session) which goal was to exactly prevent this (on my best intentions and willing collaboration).

I think I delivered my part, but the rest needs closer collaboration, which didn’t happen. So this is where we are, to improve upon.

CC @marmarek @pietrushnic and respective teams

My expectations for Qubes OS certified hardware went well beyond improved QA. I expected Qubes OS to run more smoothly on certified hardware than on uncertified hardware, with Coreboot and Heads adapted to serve as a BIOS-level foundation for a Type 1 hypervisor platform. Something like Nutanix, but for Qubes OS.

Instead, I’m disappointed to find that even routine disagreements can’t be handled professionally between devs.