From: Fabian Grünbichler <f.gruenbich...@proxmox.com> creating non-raw disk images with arbitrary content is only possible with raw access to the storage, but checking for references to external files doesn't hurt, in case for non pve-managed volumes.
Signed-off-by: Fabian Grünbichler <f.gruenbich...@proxmox.com> [ DC: removed problematic checks for pve-managed volumes ] Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> --- changes from v6: * remove unrelated hunks PVE/API2/Qemu.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index c50c42be..528ec6d1 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -442,7 +442,8 @@ my sub create_disks : prototype($$$$$$$$$$) { } } else { $source = PVE::Storage::abs_filesystem_path($storecfg, $source, 1); - ($size, my $source_format) = PVE::Storage::file_size_info($source); + # check potentially untrusted image file! + ($size, my $source_format) = PVE::Storage::file_size_info($source, undef, 1); die "could not get file size of $source\n" if !$size; if ($live_import && $ds ne 'efidisk0') { -- 2.39.5 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel