> qcow2_check_convert_hdr() checks header_length only when the
> compression bit is set, and only against sizeof(struct QCowHeader). A
> v3 image with header_length below the fixed v3 header size is
> accepted, and the header extension parser then starts at
> header_length and reads the fixed header fields as extensions.
>
> The driver used to refuse such images, but the check went under the
> compression bit when zstd support was added.
>
> Fail with -EINVAL when a v3 image has header_length below 104,
> regardless of its incompatible features, as qemu does ("qcow2 header
> too short").
>
> Fixes: 66195f78dd3c ("dm-qcow2: add zstd decompression")
> https://virtuozzo.atlassian.net/browse/VSTOR-152393
> Feature: dm-qcow2: block device over QCOW2 files driver
>
> Signed-off-by: Alexander Ivanov <[email protected]>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review ยท
https://sashiko.vzint.dev/#/patchset/[email protected]?part=1
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel