mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00

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>
13 lines
580 B
Text
13 lines
580 B
Text
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
|