1. 01 4月, 2014 2 次提交
  2. 13 3月, 2014 1 次提交
  3. 22 2月, 2014 1 次提交
  4. 09 2月, 2014 1 次提交
  5. 06 12月, 2013 1 次提交
  6. 28 11月, 2013 1 次提交
  7. 14 11月, 2013 1 次提交
    • P
      qcow2: fix possible corruption when reading multiple clusters · 78a52ad5
      Peter Lieven 提交于
      if multiple sectors spanning multiple clusters are read the
      function count_contiguous_clusters should ensure that the
      cluster type should not change between the clusters.
      
      Especially the for-loop should break when we have one
      or more normal clusters followed by a compressed cluster.
      
      Unfortunately the wrong macro was used in the mask to
      compare the flags.
      
      This was discovered while debugging a data corruption
      issue when converting a compressed qcow2 image to raw.
      qemu-img reads 2MB chunks which span multiple clusters.
      
      CC: qemu-stable@nongnu.org
      Signed-off-by: NPeter Lieven <pl@kamp.de>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      78a52ad5
  8. 06 11月, 2013 1 次提交
  9. 11 10月, 2013 1 次提交
  10. 07 10月, 2013 1 次提交
  11. 02 10月, 2013 1 次提交
  12. 27 9月, 2013 7 次提交
  13. 26 9月, 2013 1 次提交
    • M
      qcow2: Assert against currently impossible overflow · c01dbccb
      Max Reitz 提交于
      If qcow2_alloc_cluster_link_l2 is called with a QCowL2Meta describing a
      request crossing L2 boundaries, a buffer overflow will occur. This is
      impossible right now since such requests are never generated (every
      request is shortened to L2 boundaries before) and probably also
      completely unintended (considering the name "QCowL2Meta"), however, it
      is still worth an assertion.
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c01dbccb
  14. 12 9月, 2013 2 次提交
  15. 30 8月, 2013 2 次提交
  16. 24 6月, 2013 2 次提交
  17. 14 5月, 2013 1 次提交
    • K
      qcow2: Catch some L1 table index overflows · 2cf7cfa1
      Kevin Wolf 提交于
      This catches the situation that is described in the bug report at
      https://bugs.launchpad.net/qemu/+bug/865518 and goes like this:
      
          $ qemu-img create -f qcow2 huge.qcow2 $((1024*1024))T
          Formatting 'huge.qcow2', fmt=qcow2 size=1152921504606846976 encryption=off cluster_size=65536 lazy_refcounts=off
          $ qemu-io /tmp/huge.qcow2 -c "write $((1024*1024*1024*1024*1024*1024 - 1024)) 512"
          Segmentation fault
      
      With this patch applied the segfault will be avoided, however the case
      will still fail, though gracefully:
      
          $ qemu-img create -f qcow2 /tmp/huge.qcow2 $((1024*1024))T
          Formatting 'huge.qcow2', fmt=qcow2 size=1152921504606846976 encryption=off cluster_size=65536 lazy_refcounts=off
          qemu-img: The image size is too large for file format 'qcow2'
      
      Note that even long before these overflow checks kick in, you get
      insanely high memory usage (up to INT_MAX * sizeof(uint64_t) = 16 GB for
      the L1 table), so with somewhat smaller image sizes you'll probably see
      qemu aborting for a failed g_malloc().
      
      If you need huge image sizes, you should increase the cluster size to
      the maximum of 2 MB in order to get higher limits.
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      2cf7cfa1
  18. 28 3月, 2013 13 次提交