diff options
author | Kevin Wolf <kwolf@redhat.com> | 2014-05-07 17:30:30 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-05-19 11:36:49 +0200 |
commit | 7159a45b2bf2dcb9f49f1e27d1d3d135a0247a2f (patch) | |
tree | 9f386b302d585c903fd61522e4e584021eadfcff /tests/qemu-iotests/092.out | |
parent | ea54feff58efedc809641474b25a3130309678e7 (diff) |
qcow1: Check maximum cluster size
Huge values for header.cluster_bits cause unbounded allocations (e.g.
for s->cluster_cache) and crash qemu this way. Less huge values may
survive those allocations, but can cause integer overflows later on.
The only cluster sizes that qemu can create are 4k (for standalone
images) and 512 (for images with backing files), so we can limit it
to 64k.
Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Diffstat (limited to 'tests/qemu-iotests/092.out')
-rw-r--r-- | tests/qemu-iotests/092.out | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/qemu-iotests/092.out b/tests/qemu-iotests/092.out new file mode 100644 index 0000000000..8bf81580cd --- /dev/null +++ b/tests/qemu-iotests/092.out @@ -0,0 +1,13 @@ +QA output created by 092 + +== Invalid cluster size == +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 +qemu-io: can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k +no file open, try 'help open' +qemu-io: can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k +no file open, try 'help open' +qemu-io: can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k +no file open, try 'help open' +qemu-io: can't open device TEST_DIR/t.qcow: Cluster size must be between 512 and 64k +no file open, try 'help open' +*** done |