[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-stable] [Qemu-devel] [PATCH v4 26/30] savevm: fix potential se
From: |
Peter Maydell |
Subject: |
Re: [Qemu-stable] [Qemu-devel] [PATCH v4 26/30] savevm: fix potential segfault on invalid state |
Date: |
Mon, 31 Mar 2014 17:04:41 +0100 |
On 31 March 2014 15:17, Michael S. Tsirkin <address@hidden> wrote:
> savevm will segfault if version_id < vmsd->minimum_version_id &&
> version_id >= vmsd->minimum_version_id_old
...and the vmstate has no load_state_old handler.
> This calls through a NULL pointer. This is a bug (should
> exit not crash).
I'd previously assumed that this was a vmstate description
bug if it happened (ie that a vmstate with
minimum_version_id_old < minimum_version_id but no
load_state_old wasn't allowed).
Rather than failing migration here, wouldn't it be better
to either:
(a) diagnose the bug, by asserting at the earliest
opportunity
(b) define that the value of minimum_version_id_old is not
relevant unless load_state_old is set
I would strongly prefer (b) -- this would allow us to
remove the now-pointless setting of minimum_version_id_old
in huge numbers of vmstate structures. (Only five devices
make use of load_state_old: acpi, apic, i440fx, pit and
the ppc cpu).
thanks
-- PMM
- Re: [Qemu-stable] [Qemu-devel] [PATCH v4 20/30] ssi-sd: fix buffer overrun on invalid state load, (continued)
- [Qemu-stable] [PATCH v4 21/30] ssd0323: fix buffer overun on invalid state load, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 22/30] tsc210x: fix buffer overrun on invalid state load, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 23/30] zaurus: fix buffer overrun on invalid state load, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 25/30] virtio-scsi: fix buffer overrun on invalid state load, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 24/30] usb: sanity check setup_index+setup_len in post_load, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 26/30] savevm: fix potential segfault on invalid state, Michael S. Tsirkin, 2014/03/31
- Re: [Qemu-stable] [Qemu-devel] [PATCH v4 26/30] savevm: fix potential segfault on invalid state,
Peter Maydell <=
- [Qemu-stable] [PATCH v4 27/30] vmxnet3: validate interrupt indices coming from guest, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 28/30] vmxnet3: validate interrupt indices read on migration, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 29/30] vmxnet3: validate queues configuration coming from quest, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 30/30] vmxnet3: validate queues configuration read on migration, Michael S. Tsirkin, 2014/03/31
- [Qemu-stable] [PATCH v4 08/30] ahci: fix buffer overrun on invalid state load, Michael S. Tsirkin, 2014/03/31