pvmfw: Detect pvmfw overlap before REQUEST_MMIO

As pKVM maps (stage-2) any MMIO region that pvmfw passes in the
REQUEST_MMIO HVC, a malicious host could set up VFIO+KVM to map physical
pages of MMIO in pvmfw's address space. As long as pvmfw hasn't (yet)
touched those pages, they will be mapped by the hyp and then accessed
unintentionally by pvmfw in place of the expected memory pages (e.g. for
.text, .rodata, the appended config data, the stack, the payload, ...).

Bug: 316862665
Test: atest libpvmfw.device_assignment.test
Change-Id: I1dd2c16f3e5e407b14bfbf8b8481b43fbb059d1f
3 files changed
tree: 0c9d5756eafe678f9e5e7ece86628e6f7abbfaef
  1. apex/
  2. apkdmverity/
  3. authfs/
  4. compos/
  5. demo/
  6. demo_native/
  7. docs/
  8. encryptedstore/
  9. java/
  10. launcher/
  11. libs/
  12. microdroid/
  13. microdroid_manager/
  14. pvmfw/
  15. rialto/
  16. service_vm/
  17. tests/
  18. virtualizationmanager/
  19. virtualizationservice/
  20. vm/
  21. vm_payload/
  22. vmbase/
  23. vmclient/
  24. zipfuse/
  25. .clang-format
  26. .gitignore
  27. Android.bp
  28. avf_flags.aconfig
  29. OWNERS
  30. PREUPLOAD.cfg
  31. README.md
  32. rustfmt.toml
  33. TEST_MAPPING
README.md

Android Virtualization Framework (AVF)

Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.

Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.

If you want a quick start, see the getting started guideline and follow the steps there.

For in-depth explanations about individual topics and components, visit the following links.

AVF components:

AVF APIs:

How-Tos: