qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH repost 0/4] add mitigation against buffer overflows
Date: Mon, 28 Sep 2015 13:01:55 +0200	[thread overview]
Message-ID: <56091E23.4090409@redhat.com> (raw)
In-Reply-To: <1443348833-22760-1-git-send-email-mst@redhat.com>



On 27/09/2015 12:14, Michael S. Tsirkin wrote:
> 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
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Regarding my request to add comments in patch 2, feel free to add them
directly in patch 4 instead.

Paolo

      parent reply	other threads:[~2015-09-28 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56091E23.4090409@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).