Skip to content

RFC add mitigation against buffer overflows

Michael S. Tsirkin qemu-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3oslib: rework anonimous RAM allocationutil/oslib-posix.c+10 -20 replies
2/3oslib: allocate PROT_NONE pages on top of RAMutil/oslib-posix.c+4 -40 replies
3/3exec: allocate PROT_NONE pages on top of RAMexec.c+39 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH RFC 0/3] add mitigation against buffer overflows

Multiple places in QEMU map guest memory, then access it directly. Unfortunately since we are using C, there's always a chance that we'll miss a bounds check when we do this. This has a potential to corrupt QEMU memory.

As a mitigation strategy against such exploits, allocate a page in HVA space on top of each RAM chunk with PROT_NONE protection.

Buffer overflows will now cause QEMU to crash.

Lightly tested.

Michael S. Tsirkin (3):
oslib: rework anonimous RAM allocation
oslib: allocate PROT_NONE pages on top of RAM
exec: allocate PROT_NONE pages on top of RAM

 exec.c             | 42 +++++++++++++++++++++++++++++++++++++++---
 util/oslib-posix.c | 20 ++++++++++++++------
 2 files changed, 53 insertions(+), 9 deletions(-)
Signature · 1 line
MST