Threat Model
Predates the current research question (2026-11-02). Written in May 2026 for the earlier Linux-and-RTOS framing on NXP i.MX95; not yet revised. Current state: Home and the repository README.
All isolation claims in the Haven thesis are scoped to the adversary model defined here.
Adversary Model
Section titled “Adversary Model”What the adversary controls
Section titled “What the adversary controls”- A compromised or faulty partition (Linux-class or RTOS-class).
- A compromised device driver within a partition that has DMA capability.
- A guest that has escaped its EL1/EL0 privilege boundary.
What the adversary can do
Section titled “What the adversary can do”- Issue arbitrary load/store instructions within its own EL1/EL0 context.
- Program a device under its control to perform DMA to any bus address.
- Trigger high CPU load (scheduling pressure) indefinitely within its domain.
- Send malformed hypercall arguments (invalid partition IDs, addresses, sizes, access flags).
- Attempt to acquire IRQs, IOMMU groups, or SMMU streams owned by another partition.
- Attempt to read or write physical memory outside its Stage-2 allocation.
What the adversary cannot do (trusted base)
Section titled “What the adversary cannot do (trusted base)”- Execute at EL2 privilege.
- Modify Stage-2 page table descriptors directly.
- Reprogram SMMU context or stream table entries directly.
- Modify GIC distributor routing registers directly.
- Alter the hypervisor binary or its static partition configuration.
Security Goals
Section titled “Security Goals”Spatial isolation
Section titled “Spatial isolation”| Goal | Enforcement | Test evidence |
|---|---|---|
| Memory containment: no cross-partition PA read/write | Stage-2 MMU (src/core/mm/stage2.c) |
test_spatial_isolation.c |
| DMA containment: device DMA constrained to owning partition’s PA | SMMU (src/core/dma/smmu.c) |
test_smmu_hardware.c S1–S5 |
| IOMMU group exclusivity: each group owned by ≤ 1 partition | IOMMU policy (src/core/iommu/iommu_policy.c) |
test_spatial_isolation.c |
Temporal isolation
Section titled “Temporal isolation”| Goal | Enforcement | Test evidence |
|---|---|---|
CPU budget enforcement: partition ≤ budget_ns per period_ns |
Budget scheduler (src/core/sched/budget.c) |
test_temporal_isolation.c |
| Deadline non-interference: partition A expiry does not affect partition B | Timer (src/core/time/timer.c) |
test_timer.c |
| IRQ route exclusivity: each IRQ routed to exactly one partition | IRQ ownership (src/core/irq/ownership.c) |
test_el2_exceptions.c |
Fail-closed invariants
Section titled “Fail-closed invariants”- Every enforcement function returns
HV_EINVAL,HV_EPERM, orHV_ENOSPCon invalid input - no silent success. - A partition with an expired, unacknowledged timer deadline cannot arm a new deadline (
HV_EBUSYfail-closed guard). - Partition ID 0 is reserved and rejected by all enforcement modules.
Attack Scenarios and Mitigations
Section titled “Attack Scenarios and Mitigations”| Attack | Module | Mitigation | Test |
|---|---|---|---|
| Guest maps peer’s PA | Stage-2 | Cross-partition PA overlap denial | test_spatial_isolation.c |
| Device DMA escapes to peer PA | SMMU | PA containment check vs Stage-2 | test_smmu_hardware.c (S1–S5) |
| DMA window type mismatch (RO vs RW) | SMMU | Access-flag enforcement | test_smmu_hardware.c (S6–S7) |
| StreamID pool exhaustion DoS | SMMU | Hard cap HV_ENOSPC |
test_smmu_hardware.c (S8) |
| Guest steals peer’s IRQ | IRQ ownership | Owner check + HV_EPERM |
test_isolation_negative.c |
| Guest steals peer’s IOMMU group | IOMMU | Owner check + HV_EPERM |
test_isolation_negative.c |
| Guest exhausts CPU budget | Budget | hv_budget_consume deny |
test_temporal_isolation.c |
| Guest bypasses timer deadline | Timer | Fail-closed unack guard | test_timer.c |
| Hypervisor state corruption via re-init | All modules | selftest_reinit invariant |
test_hypervisor_invariants.c |
| Malformed hypercall arguments | All modules | Boundary validation at every entry | All unit test negative paths |
| Partition B UART MMIO access | Stage-2 | No UART map for B; stage-2 DABT | test_spatial_isolation.c |
| EL2 virtual IRQ injection without owner | IRQ + EL2 | Ownership validated before ICH_LR write |
test_el2_exceptions.c |
Non-Goals
Section titled “Non-Goals”- Defense against microarchitectural side-channels (Spectre/Meltdown, cache timing attacks).
- Runtime dynamic partition migration or budget renegotiation.
- Fault-tolerant recovery from hardware errors inside a partition.
- Resistance to physically present attackers with JTAG or bus access.
- Denial-of-service from a partition consuming its full allocated budget (budget exhaustion is by design - it is the partition’s own resource).
- Host OS (Linux) kernel vulnerabilities unrelated to the hypervisor interface.
Security Advisory Process
Section titled “Security Advisory Process”Security-relevant issues (isolation boundary violations, privilege escalation, SMMU bypass paths) follow a 90-day coordinated disclosure process. See SECURITY.md for reporting instructions.