[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SecureBoot requirements regarding Dom0


  • To: Teddy Astie <teddy.astie@xxxxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Tue, 24 Feb 2026 17:50:16 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BEdFHD/VQHi8H7CBQ0VuwqAFOocG93JTfG2Mt5YjRyI=; b=McXp6XcWIQA/4o2/rTzi2xXy4Il9sl9mnC+zr8EROWKYj3pMCfcpSDqL3RJQVoKlD3aPkIJJuvP6pk3QzERnjGnwO5WbfzbjoKCS5DuHZK6Wlr2vuyZKoIsXAObf5ySID4eCVfzCT5nLlN2/+kfxKkWHjUG9sXGuqNfGzx+xyFZteFemFdYx8dhriUbGx8cSRdOjXdDDQpNq8ZJSjgtRt8mmocnfO7o6Mi3jPEt1LNu6xZIzsr5a7FRYP72Bb8KaVtIU2ZBjQuaTGRMqaqyrSVqbQAiX637dskg1xFGDVAW5l5Ipt7GrCWOdH8J6DvGHMLBKnOFDScbYfHwhp7i4DQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BsHvxBEtV4kN6pFw3fxKscTDnpK0nLeyqitaoMtnfg+QKsT8T9okzxOOrJW6t6DFWvcaBm/C2tZ1WmEaQIUT+gTp2iLD0rmCl7Kjdu/HTTPZnZtb7P3+I1sQLxVGlZ1gMFRoplOVK3JxRtVJ4+F4aT1aAuf70G0H3DTpfICbsGQ8wH6QE2DAtvvyl781YZCyquXWH6VS/twK8RqHormaxix3V2/1J65P/pL4wVDwZmVT5P4FMr2Go9qNrfuVI9Xv5qUH8YE2R8iTlk57UTWNfYb47xbHYhgNmyRnLnlGa3nn+TDfvEneTXoWpfZ1aRS3t+8Y+5+H6EZeoPwc6VAfNw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 24 Feb 2026 16:50:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Feb 23, 2026 at 01:42:39PM +0000, Teddy Astie wrote:
> I have some questions regarding SecureBoot and Xen.
> The only document that appears to define some sort of policy between Xen 
> and SecureBoot is this one 
> https://andrewcoop-xen.readthedocs.io/en/docs-secureboot/admin-guide/uefi-secure-boot.html.
> That is also similar to discussions made in SecureBoot-related talks.
> 
>  > Within the Xen architecture, Xen, the control domain and hardware 
> domain share responsibility for running and administering the platform. 
> This makes their kernels privileged as far as Secure Boot is concerned.
> 
> Why does SecureBoot needs to expand to Dom0 kernel ? If you e.g restrict 
> DMA through IOMMU and restrict some key hypercalls like kexec (among 
> some others), Dom0 shouldn't be able to compromise Xen (in principle); 
> hence can't escape SecureBoot boundaries.
> 
> SecureBoot doesn't appears to require preventing device access from 
> "unprivileged code" otherwise VFIO wouldn't be allowed under SecureBoot. 
> But such device access still needs to be contained (e.g through IOMMU 
> enforcement), that's something Xen already supports (e.g 
> dom0-iommu=strict / PVH Dom0).

What about the platform operations that deal with runtime services?
Those could mess up with the firmware, and are available to dom0.  Not
allowing dom0 to use those might result in a crippled dom0, for
example not being able to change the boot entries.

dom0 also gets access to (almost) all the IO ports and IO mem space,
plus also unmediated access to almost all the PCI config space, which
includes access to the root complex registers.

Or another example, the low 1M is accessible by a PV dom0 as IO memory
IIRC.  That's also where Xen places the AP startup trampoline.  Dom0
could modify that region and thus inject malicious code directly into
the AP startup path.  Then doing CPU unplug and hotplug would execute
that injected code.  We should probably adjust that in
dom0_setup_permissions() so dom0 cannot map the trampilone page, but
this is just an example of possibly many places dom0 has traditionally
been considered trusted, and that would likely be against a sane
Secure Boot policy.

> In that case, devices are only allowed to access Dom0, but can't access 
> outside of it.
> 
>  From a technical standpoint, PVH Dom0 setups (and also PV Dom0 
> depending on configuration) acts very similarly to a SecureBoot-able 
> Linux kernel which runs a KVM virtual machine with all host devices 
> passed-through it (using vfio-pci).

As said above - there's a bit more to it.

I'm not saying it can be done, but we are certainly not there yet.
And we don't even know exactly what would need limiting, due to the
assumption always been made about dom0 being trusted.

Regards, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.