|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/7] x86/kexec: add digest checks
On 6/23/26 5:08 PM, Andrew Cooper wrote: On 23/06/2026 3:44 pm, Jan Beulich wrote:On 22.06.2026 17:18, Kevin Lampis wrote:From: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> To support UEFI Secure Boot we must check that the kexec data has not changed between signature verification and actual execution. However, this is also a good check to perform generally. During kexec load, calculate a digest over all the kexec segments. This digest is stored and verified again later prior to entering the image. For now, only kexec crash images are supported. Signed-off-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx> Signed-off-by: Kevin Lampis <kevin.lampis@xxxxxxxxxx>I guess I'm not quite following here. For secure boot purposes, shouldn't the new kernel already come with a digest (or really with a signature), which we could check in both kexec_load() and kexec_crash()? If we check against a digest we calculated ourselves, we'd apply more trust than we should.There are two problems. One is plain TOCTOU. We load the crash kernel at boot, and we jump to it in the case that something has fatally-but-not-catastrophically gone wrong. Really, the digest here is an integrity check. One is that Xen cannot perform the signature check on the passed kernel. At least, not without gaining a full X.509 stack and authenticode algorithm, or a PGP implementation or equivalent. ExitBootServices() nukes SHIM_LOCK/LOADER protocols so they cannot be used later in runtime. FWIW at one point Shim did have the option to keep the SHIM_LOCK protocol after ExitBootServices(). We tried to use it but it was buggy and didn't work and was then removed when the new LOADER protocol came in. Ross
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |