summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormischa <mischa@rx.high5.nl>2021-01-19 19:59:07 +0100
committermischa <mischa@rx.high5.nl>2021-01-19 19:59:07 +0100
commit90bafb5cf7606b214af94634e726e6a0879ee919 (patch)
tree8907f07bbe14f1f9b5783e8643e0b3e3e16ca961
parentfd0e54e9e2a90131722a4ba3f46f754d433c6ebd (diff)
add format to vm.conf, potential CVE-2010-3851
-rwxr-xr-xdeploy.pl5
1 files 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;