aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/138.out
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2019-02-27 16:14:30 +0300
committerMax Reitz <mreitz@redhat.com>2019-05-07 17:14:21 +0200
commita5fff8d4b4d928311a5005efa12d0991fe3b66f9 (patch)
tree23e9fcc05dc61c55bed7705ae09430959c692cd0 /tests/qemu-iotests/138.out
parent7e3e736cbd37a633ed5673de4254424745fbf520 (diff)
downloadqemu-a5fff8d4b4d928311a5005efa12d0991fe3b66f9.zip
qemu-a5fff8d4b4d928311a5005efa12d0991fe3b66f9.tar.gz
qemu-a5fff8d4b4d928311a5005efa12d0991fe3b66f9.tar.bz2
qcow2-refcount: avoid eating RAM
qcow2_inc_refcounts_imrt() (through realloc_refcount_array()) can eat an unpredictable amount of memory on corrupted table entries, which are referencing regions far beyond the end of file. Prevent this, by skipping such regions from further processing. Interesting that iotest 138 checks exactly the behavior which we fix here. So, change the test appropriately. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 20190227131433.197063-3-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/138.out')
-rw-r--r--tests/qemu-iotests/138.out5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/qemu-iotests/138.out b/tests/qemu-iotests/138.out
index 3fe911f..aca7d47 100644
--- a/tests/qemu-iotests/138.out
+++ b/tests/qemu-iotests/138.out
@@ -5,5 +5,8 @@ QA output created by 138
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=512
wrote 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
-qemu-img: Check failed: Cannot allocate memory
+ERROR: counting reference for region exceeding the end of the file by one cluster or more: offset 0x80000000000000 size 0x200
+
+1 errors were found on the image.
+Data may be corrupted, or further writes to the image may corrupt it.
*** done