Bug 1129892 - Backport additional qcow2 corruption prevention and image repair patches
Summary: Backport additional qcow2 corruption prevention and image repair patches
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Max Reitz
QA Contact: Virtualization Bugs
Depends On:
Blocks: 1129893
TreeView+ depends on / blocked
Reported: 2014-08-13 21:25 UTC by Ademar Reis
Modified: 2015-07-22 06:06 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1129893 (view as bug list)
Last Closed: 2015-07-22 06:06:43 UTC

Attachments (Terms of Use)
Reproduction test log (10.47 KB, text/plain)
2015-05-11 07:04 UTC, Qunfang Zhang
no flags Details
Verification test log (1.57 KB, text/plain)
2015-05-11 07:05 UTC, Qunfang Zhang
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1275 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2015-07-20 17:49:16 UTC

Description Ademar Reis 2014-08-13 21:25:34 UTC
Via Bug 1004420, we introduced a few "qcow2 corruption prevention" patches.

But there are some recent upstream follow-ups that apparently should be included as well. This BZ is to track it and analyse which of these fixes should be backported.

Right now I see the following two series:

Date: Thu,  7 Aug 2014 22:47:52 +0200
From: Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH 0/3] qcow2: Prevent corruption-related crashes

Max Reitz (3):
  qcow2: Catch !*host_offset for data allocation
  iotests: Add test for image header overlap
  block: Catch !bs->drv in bdrv_check()


Date: Wed, 13 Aug 2014 23:01:42 +0200
From: Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH 0/8] qcow2: Fix image repairing

Max Reitz (8):
  qcow2: Factor out refcount accounting for check
  qcow2: Factor out refcount comparison for check
  qcow2: Fix refcount blocks beyond image end
  qcow2: Do not perform potentially damaging repairs
  qcow2: Rebuild refcount structure during check
  qcow2: Clean up after refcount rebuild
  iotests: Fix test outputs
  iotests: Add test for potentially damaging repairs

Comment 5 Jeff Nelson 2015-04-24 20:01:40 UTC
Fix included in qemu-kvm-

Comment 7 Qunfang Zhang 2015-05-06 03:11:39 UTC
Hi, Max

We verified the bug 1004420 before with the test case 060 in the qemu-iotests.  So how do we verify this one? Which test cases or what scenarios we should execute? 


Comment 8 Max Reitz 2015-05-06 17:11:12 UTC
Hi Qunfang,

The backport for this BZ includes additions to some iotests, so using them as a basis should be good. Tests with additional test cases are 060, 107, 108, and 114, so these should pass. On the other hand, running these test cases from qemu-kvm- with qemu-kvm- should fail.

Additionally, all tests which passed before the version the fix for this BZ is included in should still pass for qcow2, i.e., a pretty important thing to make sure is that qcow2 still works as before.

I hope this helps,


Comment 10 Qunfang Zhang 2015-05-11 07:04:24 UTC
Created attachment 1024110 [details]
Reproduction test log

Comment 11 Qunfang Zhang 2015-05-11 07:05:05 UTC
Created attachment 1024111 [details]
Verification test log

Comment 12 Qunfang Zhang 2015-05-11 07:06:25 UTC
Setting to VERIFIED according to comment 9, comment 10, comment 11.

Comment 14 errata-xmlrpc 2015-07-22 06:06:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.