[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 031/108] stellaris_enet: block migration
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 031/108] stellaris_enet: block migration |
Date: |
Wed, 6 Aug 2014 15:38:41 -0500 |
From: "Michael S. Tsirkin" <address@hidden>
Incoming migration with stellaris_enet is unsafe.
It's being reworked, but for now, simply block it
since noone is using it anyway.
Block outgoing migration for good measure.
CVE-2013-4532
Signed-off-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael Roth <address@hidden>
---
hw/net/stellaris_enet.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c
index d0da819..9cc6262 100644
--- a/hw/net/stellaris_enet.c
+++ b/hw/net/stellaris_enet.c
@@ -8,6 +8,7 @@
*/
#include "hw/sysbus.h"
#include "net/net.h"
+#include "migration/migration.h"
#include <zlib.h>
//#define DEBUG_STELLARIS_ENET 1
@@ -75,6 +76,7 @@ typedef struct {
NICConf conf;
qemu_irq irq;
MemoryRegion mmio;
+ Error *migration_blocker;
} stellaris_enet_state;
static void stellaris_enet_update(stellaris_enet_state *s)
@@ -362,7 +364,7 @@ static int stellaris_enet_load(QEMUFile *f, void *opaque,
int version_id)
stellaris_enet_state *s = (stellaris_enet_state *)opaque;
int i;
- if (version_id != 1)
+ if (1)
return -EINVAL;
s->ris = qemu_get_be32(f);
@@ -423,6 +425,10 @@ static int stellaris_enet_init(SysBusDevice *sbd)
stellaris_enet_reset(s);
register_savevm(dev, "stellaris_enet", -1, 1,
stellaris_enet_save, stellaris_enet_load, s);
+
+ error_setg(&s->migration_blocker,
+ "stellaris_enet does not support migration");
+ migrate_add_blocker(s->migration_blocker);
return 0;
}
@@ -430,6 +436,9 @@ static void stellaris_enet_unrealize(DeviceState *dev,
Error **errp)
{
stellaris_enet_state *s = STELLARIS_ENET(dev);
+ migrate_del_blocker(s->migration_blocker);
+ error_free(s->migration_blocker);
+
unregister_savevm(DEVICE(s), "stellaris_enet", s);
memory_region_destroy(&s->mmio);
--
1.9.1
- [Qemu-stable] [PATCH 018/108] ssi-sd: fix buffer overrun on invalid state load, (continued)
- [Qemu-stable] [PATCH 018/108] ssi-sd: fix buffer overrun on invalid state load, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 025/108] megasas: Implement LD_LIST_QUERY, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 022/108] usb: sanity check setup_index+setup_len in post_load, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 023/108] virtio-scsi: fix buffer overrun on invalid state load, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 014/108] virtio: avoid buffer overrun on incoming migration, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 029/108] po/Makefile: fix $SRC_PATH reference, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 027/108] block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file., Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 028/108] s390x: empty function stubs in preparation for __KVM_HAVE_GUEST_DEBUG, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 016/108] openpic: avoid buffer overrun on incoming migration, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 030/108] acpi: fix tables for no-hpet configuration, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 031/108] stellaris_enet: block migration,
Michael Roth <=
- [Qemu-stable] [PATCH 033/108] target-i386: fix set of registers zeroed on reset, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 032/108] s390x/kvm: rework KVM synchronize to tracing for some ONEREGS, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 035/108] target-arm: A64: Handle blr lr, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 036/108] target-arm: Make vbar_write 64bit friendly on 32bit hosts, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 037/108] linux-user/elfload.c: Fix incorrect ARM HWCAP bits, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 039/108] linux-user/elfload.c: Fix A64 code which was incorrectly acting like A32, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 038/108] linux-user/elfload.c: Update ARM HWCAP bits, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 026/108] arm: translate.c: Fix smlald Instruction, Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 042/108] Revert "qapi: Clean up superfluous null check in qapi_dealloc_type_str()", Michael Roth, 2014/08/06
- [Qemu-stable] [PATCH 041/108] configure: remove bashism, Michael Roth, 2014/08/06