From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS60Z-0001lq-G1 for qemu-devel@nongnu.org; Mon, 24 Mar 2014 10:37:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WS60T-0008CV-9E for qemu-devel@nongnu.org; Mon, 24 Mar 2014 10:37:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WS60T-0008CN-2B for qemu-devel@nongnu.org; Mon, 24 Mar 2014 10:37:41 -0400 Date: Mon, 24 Mar 2014 16:37:43 +0200 From: "Michael S. Tsirkin" Message-ID: <1395671853-2685-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [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 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. 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