Lune

SOSP2025顶会

Ghost in the Android Shell: Pragmatic Test-oracle Specification of a Production Hypervisor

Kayvan Memarian, Ben Simner, David Kaloper-Mersinjak, Thibaut Pérami, Peter Sewell

摘要

Developing systems code that robustly provides its intended security guarantees remains very challenging: conventional practice does not suffice, and full functional verification, while now feasible in some contexts, has substantial barriers to entry and use.

In this paper, we explore an alternative, more lightweight approach to building confidence for a production hypervisor: the pKVM hypervisor developed by Google to protect virtual machines and the Android kernel from each other. The basic approach is very simple and dates back to the 1970s: we specify the desired behaviour in a way that can be used as a test oracle, and check correspondence between that and the implementation at runtime. The setting makes that challenging in several ways: the implementation and specification are intertwined with the underlying architecture; the hypervisor is highly concurrent; the specification has to be loose in certain ways; the hypervisor runs bare-metal in a privileged exception level; naive random testing would quickly crash the whole system; and the hypervisor is written in C using conventional methods. We show how all of these can be overcome to make a practically useful specification, finding a number of critical bugs in pKVM along the way.

This is not at all what conventional developers (nor what formal verifiers) normally do -but we argue that, with the appropriate mindset, they easily could and should.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Formally Verified Memory Protection for a Commodity Multiprocessor Hypervisor 引用了 A Secure and Formally Verified Linux KVM Hypervisor
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Memclave: Secure In-Memory Enclave for Untrusted HostsAmit Choudhari, Fabian van Rissenbeck, Christian RossowUSENIX Security 2026

它引用的 Paper11

  1. Verus: Verifying Rust Programs using Linear Ghost TypesAndrea Lattuada, Travis Hance, Chanhee Cho, Matthias Brun 等OOPSLA 2023 · 86 次引用
  2. RefinedC: automating the foundational verification of C code with refined ownership typesMichael Sammler, Rodolphe Lepigre, Robbert Krebbers, Kayvan Memarian 等PLDI 2021 · 83 次引用
  3. A Secure and Formally Verified Linux KVM HypervisorShih-Wei Li, Xupeng Li, Ronghui Gu, Jason Nieh 等S&P 2021 · 72 次引用
  4. Using Lightweight Formal Methods to Validate a Key-Value Storage Node in Amazon S3James Bornholt, Rajeev Joshi, Vytautas Astrauskas, Brendan Cully 等SOSP 2021 · 63 次引用
  5. Formally Verified Memory Protection for a Commodity Multiprocessor HypervisorShih-Wei Li, Xupeng Li, Ronghui Gu, Jason Nieh 等USENIX Security 2021 · 48 次引用

相关 Paper

  1. CN: Verifying Systems C Code with Separation-Logic Refinement TypesChristopher Pulte, Dhruv C. Makwana, Thomas Sewell, Kayvan Memarian 等POPL 2023 · 26 次引用
  2. Code-Specify-Test-Debug-Prove: Flexibly Integrating Separation Logic Specification into Conventional WorkflowsZain K. Aamer, Rini Banerjee, Hiroyuki Katsura, David Kaloper-Mersinjak 等PLDI 2026 · 2 次引用
  3. überSpark: Enforcing Verifiable Object Abstractions for Automated Compositional Security Analysis of a HypervisorAmit Vasudevan, Sagar Chaki, Petros Maniatis, Limin Jia 等USENIX Security 2016 · 40 次引用
  4. eBPF Misbehavior Detection: Fuzzing with a Specification-Based OracleTao Lyu, Kumar Kartikeya Dwivedi, Thomas Bourgeat, Mathias Payer 等SOSP 2025
  5. Design of a symbolically executable embedded hypervisorJan NordholzEuroSys 2020 · 6 次引用
黄昏的海面,两侧是细线勾勒的悬崖