Bug 1175325

Summary: Delete cow block driver
Product: Red Hat Enterprise Linux 7 Reporter: Stefan Hajnoczi <stefanha>
Component: qemu-kvmAssignee: Stefan Hajnoczi <stefanha>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: huding, juzhang, knoel, ovasik, rbalakri, sluo, stefanha, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-1.5.3-85.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1175841 (view as bug list) Environment:
Last Closed: 2015-03-05 08:14:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1175841    

Description Stefan Hajnoczi 2014-12-17 13:50:33 UTC
The QEMU block/cow.c block driver is hopelessly broken and has been deleted upstream:
http://git.qemu-project.org/?p=qemu.git;a=commitdiff;h=550830f9351291c585c963204ad9127998b1c1ce

Delete it from RHEL 7 qemu-kvm so that we don't continue to ship a component that is known to be broken and no longer supported upstream.  Removing the block driver reduces the qemu-img attack surface against untrusted input files slightly.

It is highly unlikely that any users rely on the cow block driver since it is incompatible with the User Mode Linux cow file format which it purports to support.

Comment 2 Jeff Nelson 2015-01-07 19:14:13 UTC
Fix included in qemu-kvm-1.5.3-85.el7

Comment 5 Stefan Hajnoczi 2015-01-08 11:05:34 UTC
You can test that this patch has been applied successfully as follows:

$ qemu-img --help
...
Supported formats: <--- this list must not include "cow"

Comment 6 Sibiao Luo 2015-01-09 02:09:33 UTC
Reproduce this issue:
# uname -r && rpm -q qemu-kvm
3.10.0-221.el7.x86_64
qemu-kvm-1.5.3-84.el7.x86_64

# qemu-img --help | grep cow
  '-c' indicates that target image must be compressed (qcow format only)
Supported formats: vvfat vpc vmdk vhdx vdi sheepdog rbd raw host_cdrom host_floppy host_device file qed qcow2 qcow parallels nbd iscsi gluster dmg cow cloop bochs blkverify blkdebug                                             ^^^^^

# qemu-img create -f cow test.cow 1G
Formatting 'test.cow', fmt=cow size=1073741824 
# qemu-img info test.cow 
image: test.cow
file format: cow
virtual size: 1.0G (1073741824 bytes)
disk size: 4.0K

#####################################

Verify this issue:
# uname -r && rpm -q qemu-kvm
3.10.0-221.el7.x86_64
qemu-kvm-1.5.3-85.el7.x86_64

# qemu-img --help | grep cow
  '-c' indicates that target image must be compressed (qcow format only)
Supported formats: vvfat vpc vmdk vhdx vdi sheepdog rbd raw host_cdrom host_floppy host_device file qed qcow2 qcow parallels nbd iscsi gluster dmg cloop bochs blkverify blkdebug

# qemu-img create -f cow test.cow 1G
qemu-img: test.cow: Unknown file format 'cow'

Base on above, this issue has been fixed correctly, move to VERIFIED status, please correct me if any mistake, thanks.

Best Regards,
sluo

Comment 8 errata-xmlrpc 2015-03-05 08:14:12 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.

https://rhn.redhat.com/errata/RHSA-2015-0349.html