From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS7hJ-0000Rq-EX for qemu-devel@nongnu.org; Mon, 24 Mar 2014 12:26:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WS7hD-0001zx-FE for qemu-devel@nongnu.org; Mon, 24 Mar 2014 12:26:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS7hD-0001zr-6e for qemu-devel@nongnu.org; Mon, 24 Mar 2014 12:25:55 -0400 Date: Mon, 24 Mar 2014 18:25:27 +0200 From: "Michael S. Tsirkin" Message-ID: <20140324162527.GA6677@redhat.com> References: <1395671853-2685-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1395671853-2685-1-git-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [RFC v2 0/5] state loading security issues List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell On Mon, Mar 24, 2014 at 04:37:43PM +0200, Michael S. Tsirkin wrote: > In an attempt to provide a generic solution for this > set of issues, this adds a way to add validators > in the middle of the structure. > > On failure, we assert on output (should never happen) > and fail migration on input. > > The last patch in the series shows how the new > infrastructure is used. > I'll wait a bit for feedback, if there's none > I'll go ahead and use this to fix the state loading CVEs. Forgot to commit some fixes so this doesn't really work - but this is hopefully enough for people to get the general idea and comment before I build more code on top of this. Please consider this pseudo-code :) > Michael S. Tsirkin (5): > vmstate: reduce code duplication > vmstate: add VMS_NONE > vmstate: add VMS_MUST_EXIST > vmstate: add VMSTATE_TEST > hpet: fix buffer overrun on invalid state load > > include/migration/vmstate.h | 8 ++++ > hw/timer/hpet.c | 17 +++++++ > vmstate.c | 107 +++++++++++++++++++++++++------------------- > 3 files changed, 87 insertions(+), 45 deletions(-) > > -- > MST >