RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 598407 - qcow2 corruption bug in refcount table growth
Summary: qcow2 corruption bug in refcount table growth
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-06-01 10:48 UTC by Kevin Wolf
Modified: 2013-01-09 22:39 UTC (History)
4 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.75.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 598488 (view as bug list)
Environment:
Last Closed: 2010-07-02 07:21:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kevin Wolf 2010-06-01 10:48:30 UTC
A bug in rarely used code path in the refcount table growth code of qcow2 can lead to inconsistencies in the metadata, which can cause real data corruption later on.

This bug can be reproduced like this:

[rhel6/master] kwolf@dhcp-5-188:~/source/qemu-kvm-rhel6$ ./qemu-img create -f qcow2 -ocluster_size=512 /tmp/test.qcow2 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=512 
[rhel6/master] kwolf@dhcp-5-188:~/source/qemu-kvm-rhel6$ ./qemu-io /tmp/test.qcow2 
qemu-io> write -b 0 64M
wrote 67108864/67108864 bytes at offset 0
64 MiB, 1 ops; 0:00:11.00 (5.791 MiB/sec and 0.0905 ops/sec)
qemu-io> [rhel6/master] kwolf@dhcp-5-188:~/source/qemu-kvm-rhel6$ ./qemu-img check /tmp/test.qcow2 
ERROR cluster 768 refcount=0 reference=1
ERROR cluster 773 refcount=2 reference=1
ERROR cluster 774 refcount=2 reference=1
ERROR cluster 1024 refcount=0 reference=1
ERROR cluster 1029 refcount=2 reference=1
ERROR cluster 1030 refcount=2 reference=1
ERROR cluster 1031 refcount=2 reference=1
7 errors were found on the image.

Comment 4 Qunfang Zhang 2010-06-17 10:10:28 UTC
Can reproduce the issue on qemu-kvm-0.12.1.2-2.73.el6, and verified pass on qemu-kvm-0.12.1.2-2.75.el6 with the given steps.

Comment 6 Qunfang Zhang 2010-07-02 07:20:32 UTC
Close it according to Comment 4.


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