diff options
author | 2015-08-10 07:04:51 -0400 | |
---|---|---|
committer | 2015-08-10 07:05:14 -0400 | |
commit | 03aa7f1902aba68926f08b4e85f95ee9f474910a (patch) | |
tree | 2ec8e4bb82428df96af1141a24cb923f6265b9a2 /app-emulation/qemu/files | |
parent | [sys-cluster/open-mx] Fix header (diff) | |
download | gentoo-03aa7f1902aba68926f08b4e85f95ee9f474910a.tar.gz gentoo-03aa7f1902aba68926f08b4e85f95ee9f474910a.tar.bz2 gentoo-03aa7f1902aba68926f08b4e85f95ee9f474910a.zip |
qemu: fix from upstream for virtio-serial security issue #557206
Diffstat (limited to 'app-emulation/qemu/files')
-rw-r--r-- | app-emulation/qemu/files/qemu-2.3.0-virtio-serial.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/app-emulation/qemu/files/qemu-2.3.0-virtio-serial.patch b/app-emulation/qemu/files/qemu-2.3.0-virtio-serial.patch new file mode 100644 index 000000000000..d84797f4e5e6 --- /dev/null +++ b/app-emulation/qemu/files/qemu-2.3.0-virtio-serial.patch @@ -0,0 +1,34 @@ +https://bugs.gentoo.org/557206 + +From 7882080388be5088e72c425b02223c02e6cb4295 Mon Sep 17 00:00:00 2001 +From: "Michael S. Tsirkin" <mst@redhat.com> +Date: Thu, 23 Jul 2015 17:52:02 +0300 +Subject: [PATCH] virtio-serial: fix ANY_LAYOUT + +Don't assume a specific layout for control messages. +Required by virtio 1. + +Signed-off-by: Michael S. Tsirkin <mst@redhat.com> +Reviewed-by: Amit Shah <amit.shah@redhat.com> +Reviewed-by: Jason Wang <jasowang@redhat.com> +--- + hw/char/virtio-serial-bus.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c +index 78c73e5..929e49c 100644 +--- a/hw/char/virtio-serial-bus.c ++++ b/hw/char/virtio-serial-bus.c +@@ -195,7 +195,8 @@ static size_t send_control_msg(VirtIOSerial *vser, void *buf, size_t len) + return 0; + } + +- memcpy(elem.in_sg[0].iov_base, buf, len); ++ /* TODO: detect a buffer that's too short, set NEEDS_RESET */ ++ iov_from_buf(elem.in_sg, elem.in_num, 0, buf, len); + + virtqueue_push(vq, &elem, len); + virtio_notify(VIRTIO_DEVICE(vser), vq); +-- +2.4.4 + |