From 90bafb5cf7606b214af94634e726e6a0879ee919 Mon Sep 17 00:00:00 2001 From: mischa Date: Tue, 19 Jan 2021 19:59:07 +0100 Subject: [PATCH] add format to vm.conf, potential CVE-2010-3851 --- deploy.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy.pl b/deploy.pl index 24a0581..6c964c9 100755 --- a/deploy.pl +++ b/deploy.pl @@ -27,6 +27,7 @@ # 2020/05/24 changed: add staggered option to vm.conf, leave disable for now # 2020/09/20 changed: add agentx option to vm.conf for OpenBSD 6.9 # 2020/10/25 changes: doas.conf for pkill option, so it works again +# 2021/01/19 changes: add format of disk images in vm.conf (CVE-2010-3851), thanx Johan Finnved # use 5.024; use strict; @@ -114,8 +115,8 @@ sub render_vm_conf { printf $fh_vm "\towner %s\n", $_owner; printf $fh_vm "\tmemory %s\n", $_memory if $_memory; printf $fh_vm "\tboot \"%s\"\n", $_boot if (! -e $_disk); - printf $fh_vm "\tdisk \"%s\"\n", $_disk; - printf $fh_vm "\tdisk \"%s\"\n", $_disk2 if $_disk2; + printf $fh_vm "\tdisk \"%s\" format %s\n", $_disk, $_disk_format; + printf $fh_vm "\tdisk \"%s\" format %s\n", $_disk2, $_disk_format if $_disk2; printf $fh_vm "\tinterface tap {\n"; printf $fh_vm "\t\tswitch \"%s\"\n", $_switch; printf $fh_vm "\t\tlladdr %s\n", $_mac;