qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/4] qcow2: Check L1/L2/reftable entries for alignment
@ 2014-08-16 21:16 Max Reitz
  2014-08-16 21:16 ` [Qemu-devel] [PATCH 1/4] qcow2: Add qcow2_signal_corruption() Max Reitz
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Max Reitz @ 2014-08-16 21:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Stefan Hajnoczi, Max Reitz

The image fuzzer from Maria exposed a lot of assertions which might fail
in qemu when fed with a broken qcow2 image. Some of them are related to
qemu trusting the offsets given in the L1, L2 and refcount tables to
always be properly aligned on cluster boundaries (e.g.
https://bugs.launchpad.net/qemu/+bug/1354529).

This series fixes this by verifying (hopefully) all data read from L1,
L2 and refcount tables accordingly; if the offsets are not aligned on
cluster boundaries, an error message is emitted and the image is marked
corrupt unless it has been opened read-only.


Max Reitz (4):
  qcow2: Add qcow2_signal_corruption()
  qcow2: Use qcow2_signal_corruption() for overlaps
  iotests: Fix output of 060
  qcow2: Check L1/L2/reftable entries for alignment

 block/qcow2-cluster.c      | 27 ++++++++++++++++++++-
 block/qcow2-refcount.c     | 59 +++++++++++++++++++++++++++++-----------------
 block/qcow2.c              | 28 ++++++++++++++++++++++
 block/qcow2.h              |  4 ++++
 tests/qemu-iotests/060.out | 10 ++++----
 5 files changed, 100 insertions(+), 28 deletions(-)

-- 
2.0.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-08-21 12:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-16 21:16 [Qemu-devel] [PATCH 0/4] qcow2: Check L1/L2/reftable entries for alignment Max Reitz
2014-08-16 21:16 ` [Qemu-devel] [PATCH 1/4] qcow2: Add qcow2_signal_corruption() Max Reitz
2014-08-20 10:10   ` Kevin Wolf
2014-08-20 19:17     ` Max Reitz
2014-08-16 21:16 ` [Qemu-devel] [PATCH 2/4] qcow2: Use qcow2_signal_corruption() for overlaps Max Reitz
2014-08-16 21:16 ` [Qemu-devel] [PATCH 3/4] iotests: Fix output of 060 Max Reitz
2014-08-20 10:13   ` Kevin Wolf
2014-08-16 21:16 ` [Qemu-devel] [PATCH 4/4] qcow2: Check L1/L2/reftable entries for alignment Max Reitz
2014-08-20 10:51   ` Kevin Wolf
2014-08-20 19:26     ` Max Reitz
2014-08-21  8:14       ` Kevin Wolf
2014-08-21 12:24         ` Eric Blake

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).