From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSCwT-0003Zl-5N for qemu-devel@nongnu.org; Mon, 24 Mar 2014 18:02:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WSCwN-0005No-61 for qemu-devel@nongnu.org; Mon, 24 Mar 2014 18:02:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27401) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WSCwM-0005Nk-Ux for qemu-devel@nongnu.org; Mon, 24 Mar 2014 18:01:55 -0400 Date: Tue, 25 Mar 2014 00:01:53 +0200 From: "Michael S. Tsirkin" Message-ID: <1395698484-22562-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 v3 0/3] state loading security issues List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , dgilbert@redhat.com 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. Changes from v2: address comments by dgilbert Michael S. Tsirkin (3): vmstate: add VMS_MUST_EXIST vmstate: add VMSTATE_TEST hpet: fix buffer overrun on invalid state load include/migration/vmstate.h | 7 +++++++ hw/timer/hpet.c | 13 +++++++++++++ vmstate.c | 10 ++++++++++ 3 files changed, 30 insertions(+) -- MST