Package: virtualbox
Version: 6.1.4-dfsg-2
Severity: normal

Dear Maintainer,

When importing a virtual machine (VM) from .ovf file that is accompanied by a
.mf file that specifies file integrity hashes using SHA256, the importer (both
fom the GUI or using VBoxManage) check the integrity of the files as part of
the import process.

Specifically, the file I am seeing the issues is the hard drive of the VM,
provided in VMDK format. The importer exits with an error indicating that the
digest of the VMDK file does not match the one in the .mf file, but using tools
such as sha256 sum I see that the hash does match (see output below).

$ VBoxManage import ~/vms/testvm0146.ovf

(...snip...)

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Appliance import failed
VBoxManage: error: Digest mismatch (VERR_NOT_EQUAL): Attribute 'SHA256' on
'testvm0146-0.vmdk' does not match
('03d3ec55ec53133041967054525ca1fbf8714208f9be242219e85a24f0745de9' vs.
'19ffb23de176d73835fe3528d5b4e5a5aac3c15b5e83fc7732f888c6c2d47f9d')
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component
ApplianceWrap, interface IAppliance
VBoxManage: error: Context: "RTEXITCODE handleImportAppliance(HandlerArg*)" at
line 1118 of file VBoxManageAppliance.cpp


However, sha256sum gives the following output:

$ sha256sum ~/vms/testvm0146-0.vmdk
03d3ec55ec53133041967054525ca1fbf8714208f9be242219e85a24f0745de9
/home/me/vms/testvm0146-0.vmdk

Additionally, sha246deep also provides the same hash:

$ sha256deep ~/vms/testvm0146-0.vmdk
03d3ec55ec53133041967054525ca1fbf8714208f9be242219e85a24f0745de9
/home/me/vms/testvm0146-0.vmdk


The contents of the testvm0146.mf file are:

$ cat ~/vms/testvm0146.mf
SHA256(testvm0146-0.vmdk)=
03d3ec55ec53133041967054525ca1fbf8714208f9be242219e85a24f0745de9
SHA256(testvm0146-1.nvram)=
4615577454b8ea7c464f4aee064936e48db52ddb08f23e9ea74ade5e12fce8ce
SHA256(testvm0146.ovf)=
7cbaf2f6dc9ada576ae99ba0f5ef001432650581ad401d4312f297d2737ced49


As can be seen, the output of sha256sum and the .mf file match
(03d3ec55ec53133041967054525ca1fbf8714208f9be242219e85a24f0745de9), but for
some reason virtualbox determines the SHA256 hash to be
19ffb23de176d73835fe3528d5b4e5a5aac3c15b5e83fc7732f888c6c2d47f9d, and thus the
comparison fails.

I would expect the hashes to match those obtained with other tools, and thus
the VM to be properly imported.

(I think this issue is different than 763447, so it has been raised separetly)

Thank you,
Best Regards,
Jonas.



-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-4-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages virtualbox depends on:
ii  adduser                               3.118
ii  iproute2                              5.5.0-1
ii  libc6                                 2.30-4
ii  libcurl3-gnutls                       7.68.0-1
ii  libdevmapper1.02.1                    2:1.02.167-1+b1
ii  libgcc-s1                             10-20200324-1
ii  libgl1                                1.3.1-1
ii  libgsoap-2.8.91                       2.8.91-2
ii  libopus0                              1.3-1+b1
ii  libpng16-16                           1.6.37-2
ii  libpython3.8                          3.8.2-1
ii  libsdl1.2debian                       1.2.15+dfsg2-5
ii  libssl1.1                             1.1.1e-1
ii  libstdc++6                            10-20200324-1
ii  libvncserver1                         0.9.12+dfsg-8
ii  libvpx6                               1.8.2-1
ii  libx11-6                              2:1.6.9-2
ii  libxcursor1                           1:1.2.0-2
ii  libxml2                               2.9.10+dfsg-4
ii  libxt6                                1:1.1.5-1+b3
ii  procps                                2:3.3.16-4
ii  python3                               3.8.2-2
ii  python3.8                             3.8.2-1
ii  virtualbox-dkms [virtualbox-modules]  6.1.4-dfsg-2
ii  zlib1g                                1:1.2.11.dfsg-2

Versions of packages virtualbox recommends:
ii  libqt5core5a    5.12.5+dfsg-9
ii  libqt5gui5      5.12.5+dfsg-9
ii  libqt5opengl5   5.12.5+dfsg-9
ii  libqt5widgets5  5.12.5+dfsg-9
ii  libxcb1         1.13.1-5
ii  libxext6        2:1.3.3-1+b2
ii  libxmu6         2:1.1.2-2+b3
ii  virtualbox-qt   6.1.4-dfsg-2

Versions of packages virtualbox suggests:
ii  vde2                            2.3.2+r586-2.2+b1
ii  virtualbox-guest-additions-iso  6.1.5-136327-1

-- no debconf information

Reply via email to