On 2017-11-01 16:42, Alberto Garcia wrote: > qcow2_do_open() is checking that header.refcount_table_clusters is not > too large, but it doesn't check that it's greater than zero. Apart > from the fact that an image like that is obviously corrupted, trying > to use it crashes QEMU since we end up with a null s->refcount_table > after qcow2_refcount_init(). > > These images can however be repaired, so allow opening them if the > BDRV_O_CHECK flag is set. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > block/qcow2.c | 6 ++++++ > tests/qemu-iotests/060 | 7 +++++++ > tests/qemu-iotests/060.out | 5 +++++ > 3 files changed, 18 insertions(+)
Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature