mirror of
https://github.com/qemu/qemu.git
synced 2025-07-31 01:18:30 +00:00

The end of the refcount table must not exceed INT64_MAX so that integer overflows are avoided. Also check for misaligned refcount table. Such images are invalid and probably the result of data corruption. Error out to avoid further corruption. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
34 lines
1.3 KiB
Plaintext
34 lines
1.3 KiB
Plaintext
QA output created by 080
|
|
|
|
== Huge header size ==
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
qemu-io: can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size
|
|
no file open, try 'help open'
|
|
qemu-io: can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size
|
|
no file open, try 'help open'
|
|
|
|
== Huge unknown header extension ==
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid backing file offset
|
|
no file open, try 'help open'
|
|
qemu-io: can't open device TEST_DIR/t.qcow2: Header extension too large
|
|
no file open, try 'help open'
|
|
|
|
== Huge refcount table size ==
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
qemu-io: can't open device TEST_DIR/t.qcow2: Reference count table too large
|
|
no file open, try 'help open'
|
|
qemu-io: can't open device TEST_DIR/t.qcow2: Reference count table too large
|
|
no file open, try 'help open'
|
|
|
|
== Misaligned refcount table ==
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid reference count table offset
|
|
no file open, try 'help open'
|
|
|
|
== Huge refcount offset ==
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
|
|
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid reference count table offset
|
|
no file open, try 'help open'
|
|
*** done
|