Refuse to open higher version for safety. Although we try to be compatible with published VMDK spec, VMware has newer version from ESXi 5.1 exported OVF/OVA, which we have no knowledge what's changed in it. And it is very likely to have more new versions in the future, so it's not safe to open them blindly.
Signed-off-by: Fam Zheng <f...@redhat.com> --- block/vmdk.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/block/vmdk.c b/block/vmdk.c index 608daaf..d9c2368 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -558,6 +558,10 @@ static int vmdk_open_vmdk4(BlockDriverState *bs, header = footer.header; } + if (le32_to_cpu(header.version) >= 3) { + return -EINVAL; + } + l1_entry_sectors = le32_to_cpu(header.num_gtes_per_gte) * le64_to_cpu(header.granularity); if (l1_entry_sectors == 0) { -- 1.8.3