Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-1.9.git;a=commitdiff;h=7c679c8f1124f929d824298db54435f901bb161b

commit 7c679c8f1124f929d824298db54435f901bb161b
Author: kikadf <[email protected]>
Date:   Mon Apr 28 16:51:17 2014 +0200

qemu-1.5.2-3arcturus4-x86_64

* Fix CVE-2013-4544, CVE-2014-2894

diff --git a/source/xapps-extra/qemu/CVE-2013-4544.patch 
b/source/xapps-extra/qemu/CVE-2013-4544.patch
new file mode 100644
index 0000000..1d2dba3
--- /dev/null
+++ b/source/xapps-extra/qemu/CVE-2013-4544.patch
@@ -0,0 +1,118 @@
+Description: fix possible arbitrary code execution via vmxnet3 device
+Origin: upstream, 
http://git.qemu.org/?p=qemu.git;a=commit;h=8c6c0478996e8f77374e69b6df68655b0b4ba689
+Origin: upstream, 
http://git.qemu.org/?p=qemu.git;a=commit;h=9878d173f574df74bde0ff50b2f81009fbee81bb
+Origin: upstream, 
http://git.qemu.org/?p=qemu.git;a=commit;h=3c99afc779c2c78718a565ad8c5e98de7c2c7484
+Origin: upstream, 
http://git.qemu.org/?p=qemu.git;a=commit;h=f12d048a523780dbda702027d4a91b62af1a08d7
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744213
+
+Index: qemu-2.0.0~rc1+dfsg/hw/net/vmxnet3.c
+===================================================================
+--- qemu-2.0.0~rc1+dfsg.orig/hw/net/vmxnet3.c  2014-04-03 14:56:23.000000000 
-0400
++++ qemu-2.0.0~rc1+dfsg/hw/net/vmxnet3.c       2014-04-24 16:07:09.794742265 
-0400
+@@ -52,6 +52,9 @@
+ #define VMXNET3_DEVICE_VERSION    0x1
+ #define VMXNET3_DEVICE_REVISION   0x1
+
++/* Number of interrupt vectors for non-MSIx modes */
++#define VMXNET3_MAX_NMSIX_INTRS   (1)
++
+ /* Macros for rings descriptors access */
+ #define VMXNET3_READ_TX_QUEUE_DESCR8(dpa, field) \
+     (vmw_shmem_ld8(dpa + offsetof(struct Vmxnet3_TxQueueDesc, field)))
+@@ -1305,6 +1308,51 @@
+            (pci_get_byte(s->parent_obj.config + PCI_INTERRUPT_PIN) - 1));
+ }
+
++static void vmxnet3_validate_interrupt_idx(bool is_msix, int idx)
++{
++    int max_ints = is_msix ? VMXNET3_MAX_INTRS : VMXNET3_MAX_NMSIX_INTRS;
++    if (idx >= max_ints) {
++        hw_error("Bad interrupt index: %d\n", idx);
++    }
++}
++
++static void vmxnet3_validate_interrupts(VMXNET3State *s)
++{
++    int i;
++
++    VMW_CFPRN("Verifying event interrupt index (%d)", s->event_int_idx);
++    vmxnet3_validate_interrupt_idx(s->msix_used, s->event_int_idx);
++
++    for (i = 0; i < s->txq_num; i++) {
++        int idx = s->txq_descr[i].intr_idx;
++        VMW_CFPRN("Verifying TX queue %d interrupt index (%d)", i, idx);
++        vmxnet3_validate_interrupt_idx(s->msix_used, idx);
++    }
++
++    for (i = 0; i < s->rxq_num; i++) {
++        int idx = s->rxq_descr[i].intr_idx;
++        VMW_CFPRN("Verifying RX queue %d interrupt index (%d)", i, idx);
++        vmxnet3_validate_interrupt_idx(s->msix_used, idx);
++    }
++}
++
++static void vmxnet3_validate_queues(VMXNET3State *s)
++{
++    /*
++    * txq_num and rxq_num are total number of queues
++    * configured by guest. These numbers must not
++    * exceed corresponding maximal values.
++    */
++
++    if (s->txq_num > VMXNET3_DEVICE_MAX_TX_QUEUES) {
++        hw_error("Bad TX queues number: %d\n", s->txq_num);
++    }
++
++    if (s->rxq_num > VMXNET3_DEVICE_MAX_RX_QUEUES) {
++        hw_error("Bad RX queues number: %d\n", s->rxq_num);
++    }
++}
++
+ static void vmxnet3_activate_device(VMXNET3State *s)
+ {
+     int i;
+@@ -1351,7 +1399,7 @@
+         VMXNET3_READ_DRV_SHARED8(s->drv_shmem, devRead.misc.numRxQueues);
+
+     VMW_CFPRN("Number of TX/RX queues %u/%u", s->txq_num, s->rxq_num);
+-    assert(s->txq_num <= VMXNET3_DEVICE_MAX_TX_QUEUES);
++    vmxnet3_validate_queues(s);
+
+     qdescr_table_pa =
+         VMXNET3_READ_DRV_SHARED64(s->drv_shmem, devRead.misc.queueDescPA);
+@@ -1447,6 +1495,8 @@
+                sizeof(s->rxq_descr[i].rxq_stats));
+     }
+
++    vmxnet3_validate_interrupts(s);
++
+     /* Make sure everything is in place before device activation */
+     smp_wmb();
+
+@@ -2005,7 +2055,6 @@
+     }
+ }
+
+-#define VMXNET3_MSI_NUM_VECTORS   (1)
+ #define VMXNET3_MSI_OFFSET        (0x50)
+ #define VMXNET3_USE_64BIT         (true)
+ #define VMXNET3_PER_VECTOR_MASK   (false)
+@@ -2016,7 +2065,7 @@
+     PCIDevice *d = PCI_DEVICE(s);
+     int res;
+
+-    res = msi_init(d, VMXNET3_MSI_OFFSET, VMXNET3_MSI_NUM_VECTORS,
++    res = msi_init(d, VMXNET3_MSI_OFFSET, VMXNET3_MAX_NMSIX_INTRS,
+                    VMXNET3_USE_64BIT, VMXNET3_PER_VECTOR_MASK);
+     if (0 > res) {
+         VMW_WRPRN("Failed to initialize MSI, error %d", res);
+@@ -2342,6 +2391,9 @@
+         }
+     }
+
++    vmxnet3_validate_queues(s);
++    vmxnet3_validate_interrupts(s);
++
+     return 0;
+ }
+
diff --git a/source/xapps-extra/qemu/CVE-2014-2894.patch 
b/source/xapps-extra/qemu/CVE-2014-2894.patch
new file mode 100644
index 0000000..b92ad28
--- /dev/null
+++ b/source/xapps-extra/qemu/CVE-2014-2894.patch
@@ -0,0 +1,37 @@
+Backport of:
+
+From 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 Mon Sep 17 00:00:00 2001
+From: =?utf8?q?Beno=C3=AEt=20Canet?= <[email protected]>
+Date: Sat, 12 Apr 2014 22:59:50 +0200
+Subject: [PATCH] ide: Correct improper smart self test counter reset in ide 
core.
+
+The SMART self test counter was incorrectly being reset to zero,
+not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
+ * We would write off the beginning of a dynamically allocated buffer
+ * We forgot the SMART history
+Fix this.
+
+Signed-off-by: Benoit Canet <[email protected]>
+Message-id: [email protected]
+Reviewed-by: Markus Armbruster <[email protected]>
+Cc: [email protected]
+Acked-by: Kevin Wolf <[email protected]>
+[PMM: tweaked commit message as per suggestions from Markus]
+Signed-off-by: Peter Maydell <[email protected]>
+---
+ hw/ide/core.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+Index: qemu-1.5.0+dfsg/hw/ide/core.c
+===================================================================
+--- qemu-1.5.0+dfsg.orig/hw/ide/core.c 2014-04-25 16:28:59.452164176 -0400
++++ qemu-1.5.0+dfsg/hw/ide/core.c      2014-04-25 16:29:20.684164520 -0400
+@@ -1607,7 +1607,7 @@
+               case 2: /* extended self test */
+               s->smart_selftest_count++;
+               if(s->smart_selftest_count > 21)
+-                      s->smart_selftest_count = 0;
++                      s->smart_selftest_count = 1;
+               n = 2 + (s->smart_selftest_count - 1) * 24;
+               s->smart_selftest_data[n] = s->sector;
+               s->smart_selftest_data[n+1] = 0x00; /* OK and finished */
diff --git a/source/xapps-extra/qemu/FrugalBuild 
b/source/xapps-extra/qemu/FrugalBuild
index d5edf26..b73e736 100644
--- a/source/xapps-extra/qemu/FrugalBuild
+++ b/source/xapps-extra/qemu/FrugalBuild
@@ -1,5 +1,4 @@
# Compiling Time: 3.00 SBU
-# Contributor: kikadf <[email protected]>
# Maintainer: Marius Cirsta <[email protected]>
# Contributor: Miklos Vajna <[email protected]>

@@ -10,7 +9,7 @@ USE_DEVEL=${USE_DEVEL:-"n"}
pkgname=qemu
pkgver=1.5.2
Fuse $USE_DEVEL && pkgver=svn6369
-pkgrel=3arcturus3
+pkgrel=3arcturus4
Fuse $USE_DEVEL && pkgrel=1
pkgdesc="QEMU is a FAST! processor emulator"
url="http://www.nongnu.org/qemu/";
@@ -50,11 +49,13 @@ TARGETS="i386-softmmu x86_64-softmmu arm-softmmu"

# FSA fix ***
source=(${source[@]} CVE-2013-4344.patch CVE-2013-4375.patch CVE-2013-4377.patch
-                     CVE-2014-0150.patch)
+                     CVE-2014-0150.patch CVE-2013-4544.patch 
CVE-2014-2894.patch)
sha1sums=(${sha1sums[@]} '24acdb676d4bea695e7b0a2cb75efdebca92bb0f' \
'761b353dbbd110fd8e75e0e5f471effdc8e37beb' \
'b50f8d0fcb307220ec670685835808dbd387fc7e' \
-                         '21f8788763786778efff306e07d0f0dc64aabb36')
+                         '21f8788763786778efff306e07d0f0dc64aabb36' \
+                         'f878bda3babc020d8c36b63b8c938acffc0bf29e' \
+                         '145c2c32445247ca5249e03b7c1ee0b975b5914d')
# ***********

build()
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to