qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
Subject: [Qemu-devel] [PATCH 096/156] qcow2: Don't rely on free_cluster_index in alloc_refcount_block() (CVE-2014-0147)
Date: Tue,  8 Jul 2014 12:18:07 -0500	[thread overview]
Message-ID: <1404839947-1086-97-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1404839947-1086-1-git-send-email-mdroth@linux.vnet.ibm.com>

From: Kevin Wolf <kwolf@redhat.com>

free_cluster_index is only correct if update_refcount() was called from
an allocation function, and even there it's brittle because it's used to
protect unfinished allocations which still have a refcount of 0 - if it
moves in the wrong place, the unfinished allocation can be corrupted.

So not using it any more seems to be a good idea. Instead, use the
first requested cluster to do the calculations. Return -EAGAIN if
unfinished allocations could become invalid and let the caller restart
its search for some free clusters.

The context of creating a snapsnot is one situation where
update_refcount() is called outside of a cluster allocation. For this
case, the change fixes a buffer overflow if a cluster is referenced in
an L2 table that cannot be represented by an existing refcount block.
(new_table[refcount_table_index] was out of bounds)

[Bump the qemu-iotests 026 refblock_alloc.write leak count from 10 to
11.
--Stefan]

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit b106ad9185f35fc4ad669555ad0e79e276083bd7)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 block/qcow2-refcount.c     | 72 ++++++++++++++++++++++++----------------------
 block/qcow2.c              | 11 +++----
 tests/qemu-iotests/026.out |  6 ++--
 tests/qemu-iotests/044.out |  2 +-
 tests/qemu-iotests/080     | 11 +++++++
 tests/qemu-iotests/080.out |  7 +++++
 6 files changed, 65 insertions(+), 44 deletions(-)

diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 6c212c9..22dfb2d 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -193,10 +193,11 @@ static int alloc_refcount_block(BlockDriverState *bs,
      *   they can describe them themselves.
      *
      * - We need to consider that at this point we are inside update_refcounts
-     *   and doing the initial refcount increase. This means that some clusters
-     *   have already been allocated by the caller, but their refcount isn't
-     *   accurate yet. free_cluster_index tells us where this allocation ends
-     *   as long as we don't overwrite it by freeing clusters.
+     *   and potentially doing an initial refcount increase. This means that
+     *   some clusters have already been allocated by the caller, but their
+     *   refcount isn't accurate yet. If we allocate clusters for metadata, we
+     *   need to return -EAGAIN to signal the caller that it needs to restart
+     *   the search for free clusters.
      *
      * - alloc_clusters_noref and qcow2_free_clusters may load a different
      *   refcount block into the cache
@@ -281,7 +282,10 @@ static int alloc_refcount_block(BlockDriverState *bs,
         }
 
         s->refcount_table[refcount_table_index] = new_block;
-        return 0;
+
+        /* The new refcount block may be where the caller intended to put its
+         * data, so let it restart the search. */
+        return -EAGAIN;
     }
 
     ret = qcow2_cache_put(bs, s->refcount_block_cache, (void**) refcount_block);
@@ -304,8 +308,7 @@ static int alloc_refcount_block(BlockDriverState *bs,
 
     /* Calculate the number of refcount blocks needed so far */
     uint64_t refcount_block_clusters = 1 << (s->cluster_bits - REFCOUNT_SHIFT);
-    uint64_t blocks_used = (s->free_cluster_index +
-        refcount_block_clusters - 1) / refcount_block_clusters;
+    uint64_t blocks_used = DIV_ROUND_UP(cluster_index, refcount_block_clusters);
 
     /* And now we need at least one block more for the new metadata */
     uint64_t table_size = next_refcount_table_size(s, blocks_used + 1);
@@ -338,8 +341,6 @@ static int alloc_refcount_block(BlockDriverState *bs,
     uint16_t *new_blocks = g_malloc0(blocks_clusters * s->cluster_size);
     uint64_t *new_table = g_malloc0(table_size * sizeof(uint64_t));
 
-    assert(meta_offset >= (s->free_cluster_index * s->cluster_size));
-
     /* Fill the new refcount table */
     memcpy(new_table, s->refcount_table,
         s->refcount_table_size * sizeof(uint64_t));
@@ -402,18 +403,19 @@ static int alloc_refcount_block(BlockDriverState *bs,
     s->refcount_table_size = table_size;
     s->refcount_table_offset = table_offset;
 
-    /* Free old table. Remember, we must not change free_cluster_index */
-    uint64_t old_free_cluster_index = s->free_cluster_index;
+    /* Free old table. */
     qcow2_free_clusters(bs, old_table_offset, old_table_size * sizeof(uint64_t),
                         QCOW2_DISCARD_OTHER);
-    s->free_cluster_index = old_free_cluster_index;
 
     ret = load_refcount_block(bs, new_block, (void**) refcount_block);
     if (ret < 0) {
         return ret;
     }
 
-    return 0;
+    /* If we were trying to do the initial refcount update for some cluster
+     * allocation, we might have used the same clusters to store newly
+     * allocated metadata. Make the caller search some new space. */
+    return -EAGAIN;
 
 fail_table:
     g_free(new_table);
@@ -659,12 +661,15 @@ int64_t qcow2_alloc_clusters(BlockDriverState *bs, int64_t size)
     int ret;
 
     BLKDBG_EVENT(bs->file, BLKDBG_CLUSTER_ALLOC);
-    offset = alloc_clusters_noref(bs, size);
-    if (offset < 0) {
-        return offset;
-    }
+    do {
+        offset = alloc_clusters_noref(bs, size);
+        if (offset < 0) {
+            return offset;
+        }
+
+        ret = update_refcount(bs, offset, size, 1, QCOW2_DISCARD_NEVER);
+    } while (ret == -EAGAIN);
 
-    ret = update_refcount(bs, offset, size, 1, QCOW2_DISCARD_NEVER);
     if (ret < 0) {
         return ret;
     }
@@ -677,7 +682,6 @@ int qcow2_alloc_clusters_at(BlockDriverState *bs, uint64_t offset,
 {
     BDRVQcowState *s = bs->opaque;
     uint64_t cluster_index;
-    uint64_t old_free_cluster_index;
     uint64_t i;
     int refcount, ret;
 
@@ -686,30 +690,28 @@ int qcow2_alloc_clusters_at(BlockDriverState *bs, uint64_t offset,
         return 0;
     }
 
-    /* Check how many clusters there are free */
-    cluster_index = offset >> s->cluster_bits;
-    for(i = 0; i < nb_clusters; i++) {
-        refcount = get_refcount(bs, cluster_index++);
+    do {
+        /* Check how many clusters there are free */
+        cluster_index = offset >> s->cluster_bits;
+        for(i = 0; i < nb_clusters; i++) {
+            refcount = get_refcount(bs, cluster_index++);
 
-        if (refcount < 0) {
-            return refcount;
-        } else if (refcount != 0) {
-            break;
+            if (refcount < 0) {
+                return refcount;
+            } else if (refcount != 0) {
+                break;
+            }
         }
-    }
 
-    /* And then allocate them */
-    old_free_cluster_index = s->free_cluster_index;
-    s->free_cluster_index = cluster_index + i;
+        /* And then allocate them */
+        ret = update_refcount(bs, offset, i << s->cluster_bits, 1,
+                              QCOW2_DISCARD_NEVER);
+    } while (ret == -EAGAIN);
 
-    ret = update_refcount(bs, offset, i << s->cluster_bits, 1,
-                          QCOW2_DISCARD_NEVER);
     if (ret < 0) {
         return ret;
     }
 
-    s->free_cluster_index = old_free_cluster_index;
-
     return i;
 }
 
diff --git a/block/qcow2.c b/block/qcow2.c
index 3daf019..45f3f8a 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1587,7 +1587,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
      */
     BlockDriverState* bs;
     QCowHeader *header;
-    uint8_t* refcount_table;
+    uint64_t* refcount_table;
     Error *local_err = NULL;
     int ret;
 
@@ -1637,9 +1637,10 @@ static int qcow2_create2(const char *filename, int64_t total_size,
         goto out;
     }
 
-    /* Write an empty refcount table */
-    refcount_table = g_malloc0(cluster_size);
-    ret = bdrv_pwrite(bs, cluster_size, refcount_table, cluster_size);
+    /* Write a refcount table with one refcount block */
+    refcount_table = g_malloc0(2 * cluster_size);
+    refcount_table[0] = cpu_to_be64(2 * cluster_size);
+    ret = bdrv_pwrite(bs, cluster_size, refcount_table, 2 * cluster_size);
     g_free(refcount_table);
 
     if (ret < 0) {
@@ -1663,7 +1664,7 @@ static int qcow2_create2(const char *filename, int64_t total_size,
         goto out;
     }
 
-    ret = qcow2_alloc_clusters(bs, 2 * cluster_size);
+    ret = qcow2_alloc_clusters(bs, 3 * cluster_size);
     if (ret < 0) {
         error_setg_errno(errp, -ret, "Could not allocate clusters for qcow2 "
                          "header and refcount table");
diff --git a/tests/qemu-iotests/026.out b/tests/qemu-iotests/026.out
index 1504579..f7c78e7 100644
--- a/tests/qemu-iotests/026.out
+++ b/tests/qemu-iotests/026.out
@@ -475,7 +475,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
 Event: refblock_alloc.write_blocks; errno: 28; imm: off; once: off; write 
 write failed: No space left on device
 
-10 leaked clusters were found on the image.
+11 leaked clusters were found on the image.
 This means waste of disk space, but no harm to data.
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 
 
@@ -499,7 +499,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
 Event: refblock_alloc.write_table; errno: 28; imm: off; once: off; write 
 write failed: No space left on device
 
-10 leaked clusters were found on the image.
+11 leaked clusters were found on the image.
 This means waste of disk space, but no harm to data.
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 
 
@@ -523,7 +523,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824
 Event: refblock_alloc.switch_table; errno: 28; imm: off; once: off; write 
 write failed: No space left on device
 
-10 leaked clusters were found on the image.
+11 leaked clusters were found on the image.
 This means waste of disk space, but no harm to data.
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1073741824 
 
diff --git a/tests/qemu-iotests/044.out b/tests/qemu-iotests/044.out
index 5c5aa92..4789a53 100644
--- a/tests/qemu-iotests/044.out
+++ b/tests/qemu-iotests/044.out
@@ -1,6 +1,6 @@
 No errors were found on the image.
 7292415/33554432 = 21.73% allocated, 0.00% fragmented, 0.00% compressed clusters
-Image end offset: 4296448000
+Image end offset: 4296152064
 .
 ----------------------------------------------------------------------
 Ran 1 tests
diff --git a/tests/qemu-iotests/080 b/tests/qemu-iotests/080
index f3091a9..56f8903 100755
--- a/tests/qemu-iotests/080
+++ b/tests/qemu-iotests/080
@@ -56,6 +56,8 @@ offset_header_size=100
 offset_ext_magic=$header_size
 offset_ext_size=$((header_size + 4))
 
+offset_l2_table_0=$((0x40000))
+
 echo
 echo "== Huge header size =="
 _make_test_img 64M
@@ -143,6 +145,15 @@ poke_file "$TEST_IMG" "$offset_backing_file_offset" "\x00\x00\x00\x00\x00\x00\x1
 poke_file "$TEST_IMG" "$offset_backing_file_size" "\xff\xff\xff\xff"
 { $QEMU_IO -c "read 0 512" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir
 
+echo
+echo "== Invalid L2 entry (huge physical offset) =="
+_make_test_img 64M
+{ $QEMU_IO -c "write 0 512" $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir
+poke_file "$TEST_IMG" "$offset_l2_table_0" "\xbf\xff\xff\xff\xff\xff\x00\x00"
+{ $QEMU_IMG snapshot -c test $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir
+poke_file "$TEST_IMG" "$offset_l2_table_0" "\x80\x00\x00\xff\xff\xff\x00\x00"
+{ $QEMU_IMG snapshot -c test $TEST_IMG; } 2>&1 | _filter_qemu_io | _filter_testdir
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
diff --git a/tests/qemu-iotests/080.out b/tests/qemu-iotests/080.out
index 8103211..303d6c3 100644
--- a/tests/qemu-iotests/080.out
+++ b/tests/qemu-iotests/080.out
@@ -63,4 +63,11 @@ no file open, try 'help open'
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 
 qemu-io: can't open device TEST_DIR/t.qcow2: Backing file name too long
 no file open, try 'help open'
+
+== Invalid L2 entry (huge physical offset) ==
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 
+wrote 512/512 bytes at offset 0
+512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-img: Could not create snapshot 'test': -27 (File too large)
+qemu-img: Could not create snapshot 'test': -11 (Resource temporarily unavailable)
 *** done
-- 
1.9.1

  parent reply	other threads:[~2014-07-08 17:24 UTC|newest]

Thread overview: 160+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-08 17:16 [Qemu-devel] Patch Round-up for stable 1.7.2, freeze on 2014-07-14 Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 001/156] char: restore read callback on a reattached (hotplug) chardev Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 002/156] scsi-bus: Fix transfer length for VERIFY with BYTCHK=11b Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 003/156] block/iscsi: fix deadlock on scsi check condition Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 004/156] s390x/virtio-hcall: Add range check for hypervisor call Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 005/156] target-i386: Fix CC_OP_CLR vs PF Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 006/156] target-i386: Fix ucomis and comis memory access Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 007/156] scsi: Change scsi sense buf size to 252 Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 008/156] qom: Avoid leaking str and bool properties on failure Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 009/156] tap: avoid deadlocking rx Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 010/156] tests: Fix 'make test' for i686 hosts (build regression) Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 011/156] configure: Don't use __int128_t for clang versions before 3.2 Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 012/156] mirror: fix throttling delay calculation Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 013/156] mirror: fix early wake from sleep due to aio Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 014/156] virtio-net: Do not filter VLANs without F_CTRL_VLAN Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 015/156] hw/net/stellaris_enet: Restructure tx_fifo code to avoid buffer overrun Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 016/156] hw/net/stellaris_enet: Correct handling of packet padding Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 017/156] qcow2: Flush metadata during read-only reopen Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 018/156] block-commit: speed is an optional parameter Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 019/156] ide: Correct improper smart self test counter reset in ide core Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 020/156] megasas: Implement LD_LIST_QUERY Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 021/156] arm: translate.c: Fix smlald Instruction Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 022/156] block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 023/156] block: Use BDRV_O_NO_BACKING where appropriate Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 024/156] s390x/helper: Added format control bit to MMU translation Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 025/156] s390x: empty function stubs in preparation for __KVM_HAVE_GUEST_DEBUG Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 026/156] po/Makefile: fix $SRC_PATH reference Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 027/156] acpi: fix tables for no-hpet configuration Michael Roth
2014-07-08 17:16 ` [Qemu-devel] [PATCH 028/156] vmxnet3: validate interrupt indices coming from guest Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 029/156] vmxnet3: validate queues configuration " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 030/156] vmxnet3: validate interrupt indices read on migration Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 031/156] vmxnet3: validate queues configuration " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 032/156] vmstate: reduce code duplication Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 033/156] vmstate: add VMS_MUST_EXIST Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 034/156] vmstate: add VMSTATE_VALIDATE Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 035/156] virtio-net: fix buffer overflow on invalid state load Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 036/156] virtio-net: out-of-bounds buffer write " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 037/156] virtio-net: out-of-bounds buffer write on load Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 038/156] virtio: out-of-bounds buffer write on invalid state load Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 039/156] ahci: fix buffer overrun " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 040/156] hpet: " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 041/156] hw/pci/pcie_aer.c: fix buffer overruns " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 042/156] pl022: fix buffer overun " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 043/156] Fix vmstate_info_int32_le comparison/assign Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 044/156] vmstate: fix buffer overflow in target-arm/machine.c Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 045/156] virtio: avoid buffer overrun on incoming migration Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 046/156] openpic: " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 047/156] virtio: validate num_sg when mapping Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 048/156] pxa2xx: avoid buffer overrun on incoming migration Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 049/156] ssi-sd: fix buffer overrun on invalid state load Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 050/156] ssd0323: fix buffer overun " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 051/156] tsc210x: fix buffer overrun " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 052/156] zaurus: " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 053/156] virtio-scsi: " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 054/156] vmstate: s/VMSTATE_INT32_LE/VMSTATE_INT32_POSITIVE_LE/ Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 055/156] usb: sanity check setup_index+setup_len in post_load Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 056/156] savevm: Ignore minimum_version_id_old if there is no load_state_old Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 057/156] virtio: validate config_len on load Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 058/156] stellaris_enet: block migration Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 059/156] target-i386: fix set of registers zeroed on reset Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 060/156] target-arm: Make vbar_write 64bit friendly on 32bit hosts Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 061/156] linux-user/elfload.c: Fix incorrect ARM HWCAP bits Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 062/156] linux-user/elfload.c: Update " Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 063/156] linux-user/elfload.c: Fix A64 code which was incorrectly acting like A32 Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 064/156] spapr_pci: Fix number of returned vectors in ibm, change-msi Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 065/156] pci-assign: limit # of msix vectors Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 066/156] virtio: allow mapping up to max queue size Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 067/156] migration: remove duplicate code Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 068/156] migration: catch unknown flags in ram_load Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 069/156] qemu-iotests: add ./check -cloop support Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 070/156] qemu-iotests: add cloop input validation tests Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 071/156] block/cloop: validate block_size header field (CVE-2014-0144) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 072/156] block/cloop: prevent offsets_size integer overflow (CVE-2014-0143) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 073/156] block/cloop: refuse images with huge offsets arrays (CVE-2014-0144) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 074/156] block/cloop: refuse images with bogus offsets (CVE-2014-0144) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 075/156] block/cloop: fix offsets[] size off-by-one Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 076/156] qemu-iotests: Support for bochs format Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 077/156] bochs: Unify header structs and make them QEMU_PACKED Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 078/156] bochs: Use unsigned variables for offsets and sizes (CVE-2014-0147) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 079/156] bochs: Check catalog_size header field (CVE-2014-0143) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 080/156] bochs: Check extent_size header field (CVE-2014-0142) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 081/156] bochs: Fix bitmap offset calculation Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 082/156] vpc/vhd: add bounds check for max_table_entries and block_size (CVE-2014-0144) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 083/156] vpc: Validate block size (CVE-2014-0142) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 084/156] vdi: add bounds checks for blocks_in_image and disk_size header fields (CVE-2014-0144) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 085/156] vhdx: Bounds checking for block_size and logical_sector_size (CVE-2014-0148) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 086/156] curl: check data size before memcpy to local buffer. (CVE-2014-0144) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 087/156] qcow2: Check header_length (CVE-2014-0144) Michael Roth
2014-07-08 17:17 ` [Qemu-devel] [PATCH 088/156] qcow2: Check backing_file_offset (CVE-2014-0144) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 089/156] qcow2: Check refcount table size (CVE-2014-0144) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 090/156] qcow2: Validate refcount table offset Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 091/156] qcow2: Validate snapshot table offset/size (CVE-2014-0144) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 092/156] qcow2: Validate active L1 table offset and size (CVE-2014-0144) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 093/156] qcow2: Fix backing file name length check Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 094/156] qcow2: fix offset overflow in qcow2_alloc_clusters_at() Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 095/156] qcow2: Zero-initialise first cluster for new images Michael Roth
2014-07-08 17:18 ` Michael Roth [this message]
2014-07-08 17:18 ` [Qemu-devel] [PATCH 097/156] qcow2: Avoid integer overflow in get_refcount (CVE-2014-0143) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 098/156] qcow2: Check new refcount table size on growth Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 099/156] qcow2: Fix types in qcow2_alloc_clusters and alloc_clusters_noref Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 100/156] qcow2: Protect against some integer overflows in bdrv_check Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 101/156] qcow2: Fix new L1 table size check (CVE-2014-0143) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 102/156] dmg: coding style and indentation cleanup Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 103/156] dmg: prevent out-of-bounds array access on terminator Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 104/156] dmg: drop broken bdrv_pread() loop Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 105/156] dmg: use appropriate types when reading chunks Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 106/156] dmg: sanitize chunk length and sectorcount (CVE-2014-0145) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 107/156] dmg: use uint64_t consistently for sectors and lengths Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 108/156] dmg: prevent chunk buffer overflow (CVE-2014-0145) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 109/156] block: Limit request size (CVE-2014-0143) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 110/156] qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 111/156] qcow2: Fix copy_sectors() with VM state Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 112/156] qcow2: Fix L1 allocation size in qcow2_snapshot_load_tmp() (CVE-2014-0145) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 113/156] qcow2: Check maximum L1 size in qcow2_snapshot_load_tmp() (CVE-2014-0143) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 114/156] parallels: Fix catalog size integer overflow (CVE-2014-0143) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 115/156] parallels: Sanity check for s->tracks (CVE-2014-0142) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 116/156] qcow1: Make padding in the header explicit Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 117/156] qcow1: Check maximum cluster size Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 118/156] qcow1: Validate L2 table size (CVE-2014-0222) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 119/156] qcow1: Validate image size (CVE-2014-0223) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 120/156] qcow1: Stricter backing file length check Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 121/156] virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 122/156] target-xtensa: fix cross-page jumps/calls at the end of TB Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 123/156] cputlb: Fix regression with TCG interpreter (bug 1310324) Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 124/156] blockdev: Plug memory leak in blockdev_init() Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 125/156] blockdev: Plug memory leak in drive_init() Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 126/156] block/qapi: Plug memory leak in dump_qobject() case QTYPE_QERROR Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 127/156] block/vvfat: Plug memory leak in check_directory_consistency() Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 128/156] block/vvfat: Plug memory leak in read_directory() Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 129/156] block/sheepdog: Plug memory leak in sd_snapshot_create() Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 130/156] qemu-img: Plug memory leak in convert command Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 131/156] linux-user: Don't overrun guest buffer in sched_getaffinity Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 132/156] tcg-i386: Fix win64 qemu store Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 133/156] target-arm: Fix errors in writes to generic timer control registers Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 134/156] s390x/css: handle emw correctly for tsch Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 135/156] aio: fix qemu_bh_schedule() bh->ctx race condition Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 136/156] kvmclock: Ensure time in migration never goes backward Michael Roth
2014-07-15 19:43   ` Paolo Bonzini
2014-07-08 17:18 ` [Qemu-devel] [PATCH 137/156] kvmclock: Ensure proper env->tsc value for kvmclock_current_nsec calculation Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 138/156] qga: Fix handle fd leak in acquire_privilege() Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 139/156] rdma: bug fixes Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 140/156] scsi-disk: fix bug in scsi_block_new_request() introduced by commit 137745c Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 141/156] vhost: fix resource leak in error handling Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 142/156] usb: Fix usb-bt-dongle initialization Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 143/156] KVM: Fix GSI number space limit Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 144/156] coroutine-win32.c: Add noinline attribute to work around gcc bug Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 145/156] target-i386: Filter FEAT_7_0_EBX TCG features too Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 146/156] virtio-net: byteswap virtio-net header Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 147/156] virtio-serial: don't migrate the config space Michael Roth
2014-07-08 17:18 ` [Qemu-devel] [PATCH 148/156] nbd: Don't export a block device with no medium Michael Roth
2014-07-08 17:19 ` [Qemu-devel] [PATCH 149/156] nbd: Don't validate from and len in NBD_CMD_DISC Michael Roth
2014-07-08 17:19 ` [Qemu-devel] [PATCH 150/156] nbd: Close socket on negotiation failure Michael Roth
2014-07-08 17:19 ` [Qemu-devel] [PATCH 151/156] nbd: Shutdown socket before closing Michael Roth
2014-07-08 17:19 ` [Qemu-devel] [PATCH 152/156] qapi: zero-initialize all QMP command parameters Michael Roth
2014-07-08 17:19 ` [Qemu-devel] [PATCH 153/156] vnc: Fix tight_detect_smooth_image() for lossless case Michael Roth
2014-07-08 17:19 ` [Qemu-devel] [PATCH 154/156] sdhci: Fix misuse of qemu_free_irqs() Michael Roth
2014-07-08 17:19 ` [Qemu-devel] [PATCH 155/156] hw: Fix qemu_allocate_irqs() leaks Michael Roth
2014-07-08 17:19 ` [Qemu-devel] [PATCH 156/156] pci: assign devfn to pci_dev before calling pci_device_iommu_address_space() Michael Roth
2014-07-09 17:43 ` [Qemu-devel] Patch Round-up for stable 1.7.2, freeze on 2014-07-14 Dr. David Alan Gilbert
2014-07-10 18:05   ` Michael Roth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1404839947-1086-97-git-send-email-mdroth@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).