Skip to content

misc: Add threat model#7875

Closed
DemiMarie wants to merge 1 commit into
cloud-hypervisor:mainfrom
DemiMarie:security
Closed

misc: Add threat model#7875
DemiMarie wants to merge 1 commit into
cloud-hypervisor:mainfrom
DemiMarie:security

Conversation

@DemiMarie

Copy link
Copy Markdown
Contributor

This adds a security policy based on the Xen Project Security Policy.

@DemiMarie DemiMarie requested a review from a team as a code owner March 22, 2026 06:51
@DemiMarie DemiMarie force-pushed the security branch 2 times, most recently from d7a6534 to 86c0caf Compare March 22, 2026 10:33
Comment thread SECURITY.md Outdated

@alyssais alyssais left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is going to be fantastic to have this.

Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
@liuw

liuw commented Mar 24, 2026

Copy link
Copy Markdown
Member

Who should be on the security team? What are the criteria for becoming a member of the security team?

Comment thread arch/src/lib.rs Outdated

@likebreath likebreath left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DemiMarie Thank you for driving this effort.

Overall, I think we should split this PR and focus on the threat model for now — supported configurations and advisory handling should be separate follow-up PRs.

My main feedback on the threat model is around organization. The goal is to make the document structured enough to be easy to follow today and easy to maintain as Cloud Hypervisor evolves — when a new component is added, it should be clear where it fits and what security properties it needs.

Currently, vulnerability outcomes (privilege escalation, DoS, info leaks), attack surfaces (disk images, PCI, network/storage), and trust boundaries (guest userspace, vhost-user) are intermixed, which makes the document harder to navigate than it needs to be. One approach would be:

  • Trust boundaries — who is trusted and who isn't
  • Attack surfaces — what can attackers interact with
  • Security-relevant outcomes — what we consider a vulnerability (and not)

That said, this is just one option. Open to other ideas on how to best structure the threat model.

@phip1611 phip1611 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very familiar with documents like this yet. However, it's probably a good idea to have one.
However, it's likely beneficial to have one in place. Thank you for your great work!

Left a few remarks

Comment thread SECURITY.md Outdated

### Privilege escalation (VM escape)

Guest VMs running in Cloud Hypervisor are assumed untrusted.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nit. line width seems to be pretty arbitrary here.

I personally limit all documents I write to a width of 80

Comment thread SECURITY.md Outdated
### Denial of service

Cloud Hypervisor is a standalone executable, not a library,
and only runs one guest throughout the entire lifetime

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

nly runs one guest throughout the entire lifetime

strictly speaking it runs 0..=1 guest at any time, depending on the configuration

Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread SECURITY.md Outdated
Comment thread arch/src/lib.rs Outdated
@DemiMarie DemiMarie force-pushed the security branch 2 times, most recently from bb6c5e2 to 197f148 Compare March 25, 2026 11:58
Comment thread docs/threat-model.md Outdated
Comment thread docs/threat-model.md Outdated
Comment thread docs/threat-model.md Outdated
Comment thread docs/threat-model.md Outdated
Comment thread docs/threat-model.md Outdated
Comment thread docs/threat-model.md Outdated

@rbradford rbradford left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused - it seems to just have a threat model file and no security policy? e.g. how to handle potential issues.

@rbradford rbradford marked this pull request as draft April 16, 2026 16:46
@rbradford rbradford changed the title misc: Add security policy misc: Add thread model Apr 16, 2026
@rbradford rbradford changed the title misc: Add thread model misc: Add threat model Apr 16, 2026

@phip1611 phip1611 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm more of an implementation-focused engineer than an expert in specifications or formal documents, so please feel free to ignore my comments if they are not useful. I can see how such a document might be beneficial, but I don’t have a strong opinion either way since this is not really my area of expertise.

Comment thread docs/threat-model.md Outdated

Cloud Hypervisor cannot protect itself or the host from hardware
vulnerabilities. This is entirely the responsibility of the hardware, firmware,
and Linux kernel. If Linux is running under another hypervisor (using nested

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and Linux kernel. If Linux is running under another hypervisor (using nested
and the Linux kernel. If Linux is running under another hypervisor (using nested

Comment thread docs/threat-model.md Outdated
Cloud Hypervisor cannot protect itself or the host from hardware
vulnerabilities. This is entirely the responsibility of the hardware, firmware,
and Linux kernel. If Linux is running under another hypervisor (using nested
virtualization), it is also the responsibility of that hypervisor.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Linux is running under another hypervisor it is also the responsibility of that hypervisor.

I'd rewrite this to be more general or omit the nesting part entirely. You ALWAYS depend on the broader runtime environment executing your code. May it be silicon/physical hardware, emulation, nested virtualization or a potential future quantum computer. Also you could run under a Linux-like kernel.

Comment thread docs/threat-model.md
and Linux kernel. If Linux is running under another hypervisor (using nested
virtualization), it is also the responsibility of that hypervisor.

Cloud Hypervisor assumes that Linux is configured to prevent the guest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cloud Hypervisor assumes that Linux is configured to prevent the guest
from reading or writing to memory belonging to the kernel or other userspace
processes.

this sounds like its a typical pitfall to misconfigure your linux. Instead, I'd say the environment must follow common best practices for proper isolation.

Comment thread docs/threat-model.md Outdated
@rbradford

Copy link
Copy Markdown
Member

This PR seems stuck? What's required to move forward with this? Is the scope too great?

@DemiMarie

Copy link
Copy Markdown
Contributor Author

@rbradford It was blocked on the public disclosure of GHSA-f47p-p25q-83rh, as I want to include lessons learned from that.

Comment thread SECURITY.md Outdated
This adds a threat model and security policy based on the Xen Project
Security Policy.

Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>

@rbradford rbradford left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this!

Comment thread docs/threat-model.md

Cloud Hypervisor does not protect itself from malicious callers.
In particular, it is not safe to run Cloud Hypervisor SUID, SGID,
or with Linux capabilities attached to its executable file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I think our instructions tell our user to set CAP_NET_ADMIN to create the tap device.

Comment thread docs/threat-model.md
- An HTTP API.
- A D-Bus API.
- If backing files are enabled (they are disabled by default),
the name of the backing file of a qcow2 image.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not really controlled by this? Also if you're talking like that the guest can control the VMM via e.g. virtio-balloon having it punch holes, etc.

Comment thread docs/threat-model.md
the guest it is running. The guest may cause Cloud Hypervisor to crash
in a non-exploitable way, such as a Rust panic. Cloud Hypervisor assumes
that a guest doing this only hurts itself.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A situation where userspace code can cause this to happen is something that we do consider an issue.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will clarify that I mean guest kernel code.

Comment thread docs/threat-model.md
Comment on lines +75 to +78
It is not safe to use a userspace driver for a device provided by Cloud
Hypervisor *except* on Arm64 with a virtio IOMMU. Even then, the
userspace driver can still cause Cloud Hypervisor (and thus the guest)
to crash.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what this means?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PCI emulation code is buggy and bad accesses can cause panics.

Comment thread SECURITY.md
Comment on lines +33 to +35
responsible for its contents and for filtering out false positives. As
an exception, reports from Miri, Valgrind, or sanitizers can generally
be assumed correct.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Comment thread SECURITY.md

- Microsoft
- Crusoe
- Cyberus Technology

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Meta
  • Google
  • UbiCloud

Do we really need to list them here - seems it would get stale quickly?

@rbradford

Copy link
Copy Markdown
Member

Would someone like to take this over an reopen it?

@rbradford rbradford closed this Jun 12, 2026
@DemiMarie

Copy link
Copy Markdown
Contributor Author

@rbradford me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants