Received: from eggs.gnu.org ([2001:4830:134:3::10]:55710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za2i8-0001oE-40 for qemu-devel@nongnu.org; Thu, 10 Sep 2015 10:20:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Za2i4-0007p4-3Q for qemu-devel@nongnu.org; Thu, 10 Sep 2015 10:20:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43612) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Za2i3-0007op-TZ for qemu-devel@nongnu.org; Thu, 10 Sep 2015 10:20:20 -0400 Date: Thu, 10 Sep 2015 17:20:16 +0300 From: "Michael S. Tsirkin" Message-ID: <1441894701-2249-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] [PATCH RFC 0/3] add mitigation against buffer overflows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Peter Maydell 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(-) -- MST