[pve-devel] [PATCH qemu-server v6 6/6] api: check untrusted image files for import content type

Fiona Ebner f.ebner at proxmox.com
Mon Nov 18 15:48:52 CET 2024


Am 15.11.24 um 16:17 schrieb Dominik Csapak:
> @@ -468,6 +470,13 @@ my sub create_disks : prototype($$$$$$$$$$$) {
>  			$live_import_mapping->{$ds}->{'delete-after-finish'} = $source
>  			    if $needs_extraction;
>  		    } else {
> +			# check potentially untrusted image file for import vtype
> +			if ($untrusted) {
> +			    my $scfg = PVE::Storage::storage_config($storecfg, $source_storage);

$scfg is unused/not required

> +			    my $path = PVE::Storage::path($storecfg, $source);
> +			    PVE::Storage::file_size_info($path, undef, 1);
> +			}
> +
>  			my $dest_info = {
>  			    vmid => $vmid,
>  			    drivename => $ds,





More information about the pve-devel mailing list