Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1134241 - QEMU fails to correctly read/write on VMDK with big flat extent
QEMU fails to correctly read/write on VMDK with big flat extent
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
7.1
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Fam Zheng
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-27 03:43 EDT by Fam Zheng
Modified: 2015-03-05 03:11 EST (History)
9 users (show)

See Also:
Fixed In Version: qemu-kvm-1.5.3-84.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-03-05 03:11:21 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0349 normal SHIPPED_LIVE Important: qemu-kvm security, bug fix, and enhancement update 2015-03-05 07:27:34 EST

  None (edit)
Description Fam Zheng 2014-08-27 03:43:11 EDT
The variable used in VMDK driver is "int" type, which will easily overflow if the extent size is large.

Quoting the test case from upstream qemu-iotests:

echo "=== Testing 4TB monolithicFlat creation and IO ==="
IMGOPTS="subformat=monolithicFlat" _make_test_img 4T
_img_info
$QEMU_IO -c "write -P 0xa 900G 512" "$TEST_IMG" | _filter_qemu_io
$QEMU_IO -c "read -v 900G 1024" "$TEST_IMG" | _filter_qemu_io

Which creates a 4TB monolithicFlat VMDK, and write at the offset of 900G. The write will hang, fail or at best succeed but pattern 0xa is not written to 900G offset in the image.

Expected result:

The pattern 0xa is written to correct position in image (900G).
Comment 4 Jeff Nelson 2014-12-16 18:40:38 EST
Fix included in qemu-kvm-1.5.3-84.el7
Comment 6 Sibiao Luo 2014-12-24 04:24:13 EST
Chart with famz in irc that we can run case 059 in qemu-iotests to verify this issue directly.

host info:
# uname -r && rpm -q qemu-kvm
3.10.0-219.el7.x86_64
qemu-kvm-1.5.3-84.el7.x86_64

qemu-iotests]# git branch -v
* rhel7/master-1.5.3 372a88f Update to qemu-kvm-1.5.3-84.el7
qemu-iotests]# ./check -vmdk
QEMU          -- /usr/libexec/qemu-kvm
QEMU_IMG      -- /usr/bin/qemu-img
QEMU_IO       -- /usr/bin/qemu-io 
IMGFMT        -- vmdk
IMGPROTO      -- file
PLATFORM      -- Linux/x86_64 dhcp-10-88 3.10.0-219.el7.x86_64
001        
002        
003        
...
053         [not run] not suitable for this image format: vmdk
054         [not run] not suitable for this image format: vmdk
059        
060         [not run] not suitable for this image format: vmdk
...
092         [not run] not suitable for this image format: vmdk
105        
Not run: 006 007 013 014 015 016 022 023 024 025 026 028 029 030 031 035 036 038 039 040 041 042 043 044 045 046 047 048 049 050 051 053 054 060 061 062 064 065 066 067 068 070 075 076 077 078 079 080 082 084 086 087 088 092
Passed all 25 tests

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 03:11:21 EST
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

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