qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH repost 0/4] add mitigation against buffer overflows
@ 2015-09-27 10:14 Michael S. Tsirkin
  2015-09-27 10:14 ` [Qemu-devel] [PATCH repost 1/4] oslib: rework anonimous RAM allocation Michael S. Tsirkin
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Michael S. Tsirkin @ 2015-09-27 10:14 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Paolo Bonzini

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.

This is a repost, combining separate patches into a single
series. No changes to patches themselves.

Michael S. Tsirkin (4):
  oslib: rework anonimous RAM allocation
  oslib: allocate PROT_NONE pages on top of RAM
  exec: allocate PROT_NONE pages on top of RAM
  exec: factor out duplicate mmap code

 include/qemu/mmap-alloc.h | 10 +++++++++
 exec.c                    | 19 ++++++++++++-----
 util/mmap-alloc.c         | 52 +++++++++++++++++++++++++++++++++++++++++++++++
 util/oslib-posix.c        | 20 ++++--------------
 util/Makefile.objs        |  2 +-
 5 files changed, 81 insertions(+), 22 deletions(-)
 create mode 100644 include/qemu/mmap-alloc.h
 create mode 100644 util/mmap-alloc.c

-- 
MST

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-30 13:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-27 10:14 [Qemu-devel] [PATCH repost 0/4] add mitigation against buffer overflows Michael S. Tsirkin
2015-09-27 10:14 ` [Qemu-devel] [PATCH repost 1/4] oslib: rework anonimous RAM allocation Michael S. Tsirkin
2015-09-27 10:14 ` [Qemu-devel] [PATCH repost 2/4] oslib: allocate PROT_NONE pages on top of RAM Michael S. Tsirkin
2015-09-28 10:59   ` Paolo Bonzini
2015-09-27 10:14 ` [Qemu-devel] [PATCH repost 3/4] exec: " Michael S. Tsirkin
2015-09-27 10:14 ` [Qemu-devel] [PATCH repost 4/4] exec: factor out duplicate mmap code Michael S. Tsirkin
2015-09-30 13:12   ` Marc-André Lureau
2015-09-28 11:01 ` [Qemu-devel] [PATCH repost 0/4] add mitigation against buffer overflows Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).