tools: Restrict configuration of qemu processes
PATCH 1/1 tools: Restrict configuration of qemu processes
Commit 6ef823fd added '-nodefaults' to the qemu args created by libxl, which is a good step in restricting qemu's default configuration. This change takes another step by adding -no-user-config, which ignores any user-provided config files in sysconfdir. Together, -nodefaults and -no-user-config allow Xen to avoid unkown and uncontrolled qemu configuration.
Both options are also added to the qemu invocation in the xen-qemu-dom0-disk-backend systemd service file.
--- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 1 + tools/libxl/libxl_dm.c | 6 ++++++ 2 files changed, 7 insertions(+)
tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1 -0
@@ -14,6 +14,7 @@ ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@ ExecStart=@qemu_xen_systemd@ -xen-domid 0 \ -xen-attach -name dom0 -nographic -M xenpv -daemonize \ -monitor /dev/null -serial /dev/null -parallel /dev/null \ + -nodefaults -no-user-config \ -pidfile @XEN_RUN_DIR@/qemu-dom0.pid [Install]
tools/libxl/libxl_dm.c +6 -0
@@ -828,6 +828,12 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,*/ flexarray_append (dm_args,"-nodefaults" ); +/* +* Do not use any of the user-provided config files in sysconfdir, +* avoiding unkown and uncontrolled configuration. +*/ +flexarray_append (dm_args,"-no-user-config" ); +if (b_info->type ==LIBXL_DOMAIN_TYPE_PV ) {flexarray_append (dm_args,"-xen-attach" ); }
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Opps, forgot to cc the tools maintainers, sorry. I can resend if needed.
Regards,
Jim
Quoted 35 lines · Jim Fehlig
Commit
6ef823fdadded '-nodefaults' to the qemu args created by libxl, which is a good step in restricting qemu's default configuration. This change takes another step by adding -no-user-config, which ignores any user-provided config files in sysconfdir. Together, -nodefaults and -no-user-config allow Xen to avoid unkown and uncontrolled qemu configuration.Both options are also added to the qemu invocation in the xen-qemu-dom0-disk-backend systemd service file.
Signed-off-by Jim Fehlig <[email protected]>--- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 1 + tools/libxl/libxl_dm.c | 6 ++++++ 2 files changed, 7 insertions(+)tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1
-0@@ -14,6 +14,7 @@ ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@ ExecStart=@qemu_xen_systemd@ -xen-domid 0 \ -xen-attach -name dom0 -nographic -M xenpv -daemonize \ -monitor /dev/null -serial /dev/null -parallel /dev/null \ + -nodefaults -no-user-config \ -pidfile @XEN_RUN_DIR@/qemu-dom0.pid [Install]tools/libxl/libxl_dm.c +0
-0@@ -828,6 +828,12 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,*/ flexarray_append (dm_args,"-nodefaults" );
tools/libxl/libxl_dm.c static int libxl__build_device_model_args_new(libxl__gc *gc, · line 839
Quoted 10 lines
tools/libxl/libxl_dm.c +6
-0+/* +* Do not use any of the user-provided config files in sysconfdir, +* avoiding unkown and uncontrolled configuration. +*/ +flexarray_append (dm_args,"-no-user-config" ); +if (b_info->type ==LIBXL_DOMAIN_TYPE_PV ) {flexarray_append (dm_args,"-xen-attach" ); }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Wei Liu
Acked-byQuoted 17 lines · Jim Fehlig
Opps, forgot to cc the tools maintainers, sorry. I can resend if needed.
Regards,
JimQuoted 11 lines · Jim Fehlig
Commit
6ef823fdadded '-nodefaults' to the qemu args created by libxl, which is a good step in restricting qemu's default configuration. This change takes another step by adding -no-user-config, which ignores any user-provided config files in sysconfdir. Together, -nodefaults and -no-user-config allow Xen to avoid unkown and uncontrolled qemu configuration.Both options are also added to the qemu invocation in the xen-qemu-dom0-disk-backend systemd service file.
Signed-off-by Jim Fehlig <[email protected]>
Quoted 25 lines
Quoted 25 lines
--- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 1 + tools/libxl/libxl_dm.c | 6 ++++++ 2 files changed, 7 insertions(+)tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1
-0@@ -14,6 +14,7 @@ ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@ ExecStart=@qemu_xen_systemd@ -xen-domid 0 \ -xen-attach -name dom0 -nographic -M xenpv -daemonize \ -monitor /dev/null -serial /dev/null -parallel /dev/null \ + -nodefaults -no-user-config \ -pidfile @XEN_RUN_DIR@/qemu-dom0.pid [Install]tools/libxl/libxl_dm.c +0
-0@@ -828,6 +828,12 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,*/ flexarray_append (dm_args,"-nodefaults" );
Quoted 10 lines
tools/libxl/libxl_dm.c static int libxl__build_device_model_args_new(libxl__gc *gc, · line 839
Quoted 9 lines
tools/libxl/libxl_dm.c +6
-0+/* +* Do not use any of the user-provided config files in sysconfdir, +* avoiding unkown and uncontrolled configuration. +*/ +flexarray_append (dm_args,"-no-user-config" ); +if (b_info->type ==LIBXL_DOMAIN_TYPE_PV ) {flexarray_append (dm_args,"-xen-attach" ); }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 14 lines · Wei Liu
Quoted 13 lines · Jim Fehlig
Opps, forgot to cc the tools maintainers, sorry. I can resend if needed.
Regards,
JimQuoted 7 lines · Jim Fehlig
Commit
6ef823fdadded '-nodefaults' to the qemu args created by libxl, which is a good step in restricting qemu's default configuration. This change takes another step by adding -no-user-config, which ignores any user-provided config files in sysconfdir. Together, -nodefaults and -no-user-config allow Xen to avoid unkown and uncontrolled qemu configuration.
Quoted 5 lines
Quoted 4 lines
Quoted 4 lines
Both options are also added to the qemu invocation in the xen-qemu-dom0-disk-backend systemd service file.
Signed-off-by Jim Fehlig <[email protected]>Acked-by Wei Liu <[email protected]>
If there are no remaining issues, can this patch be applied? Thanks!
Regards,
Jim
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
--- tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in | 1 + tools/libxl/libxl_dm.c | 6 ++++++ 2 files changed, 7 insertions(+)tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in +1
-0@@ -14,6 +14,7 @@ ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@ ExecStart=@qemu_xen_systemd@ -xen-domid 0 \ -xen-attach -name dom0 -nographic -M xenpv -daemonize \ -monitor /dev/null -serial /dev/null -parallel /dev/null \ + -nodefaults -no-user-config \ -pidfile @XEN_RUN_DIR@/qemu-dom0.pid [Install]tools/libxl/libxl_dm.c +0
-0@@ -828,6 +828,12 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,*/ flexarray_append (dm_args,"-nodefaults" );
Quoted 13 lines
Quoted 9 lines
tools/libxl/libxl_dm.c static int libxl__build_device_model_args_new(libxl__gc *gc, · line 839
Quoted 9 lines
tools/libxl/libxl_dm.c +6
-0+/* +* Do not use any of the user-provided config files in sysconfdir, +* avoiding unkown and uncontrolled configuration. +*/ +flexarray_append (dm_args,"-no-user-config" ); +if (b_info->type ==LIBXL_DOMAIN_TYPE_PV ) {flexarray_append (dm_args,"-xen-attach" ); }_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Ian Jackson
AppliedJim Fehlig writes ("[Xen-devel] [PATCH] tools: Restrict configuration of qemu processes"):
Quoted 9 lines
Commit
6ef823fdadded '-nodefaults' to the qemu args created by libxl, which is a good step in restricting qemu's default configuration. This change takes another step by adding -no-user-config, which ignores any user-provided config files in sysconfdir. Together, -nodefaults and -no-user-config allow Xen to avoid unkown and uncontrolled qemu configuration.Both options are also added to the qemu invocation in the xen-qemu-dom0-disk-backend systemd service file.
Queued, thanks. Also listed for backport.
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Ian Jackson writes ("Re: [Xen-devel] [PATCH] tools: Restrict configuration of qemu processes"):
Quoted 8 lines
Jim Fehlig writes ("[Xen-devel] [PATCH] tools: Restrict configuration of qemu processes"):
Quoted 7 lines
Commit
6ef823fdadded '-nodefaults' to the qemu args created by libxl, which is a good step in restricting qemu's default configuration. This change takes another step by adding -no-user-config, which ignores any user-provided config files in sysconfdir. Together, -nodefaults and -no-user-config allow Xen to avoid unkown and uncontrolled qemu configuration.
Quoted 4 lines
Quoted 2 lines
Both options are also added to the qemu invocation in the xen-qemu-dom0-disk-backend systemd service file.
Queued, thanks. Also listed for backport.
I found this on my backport todo list. Thinking about it, I have had second thoughts.
I worry that existing users of stable branches might be relying on the user config feature (for example by dropping qemu configuration in ~root). If they are, then applying this would break things for them.
It's not a security problem because in xen the configuration in question would have to come from ~root.
So I think, probably, that we should leave this be (ie, not backport the patch). Does anyone want to try to change my mind ?
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 15 lines · Ian Jackson
Ian Jackson writes ("Re: [Xen-devel] [PATCH] tools: Restrict configuration of qemu processes"):
Quoted 11 lines
Jim Fehlig writes ("[Xen-devel] [PATCH] tools: Restrict configuration of qemu processes"):
Quoted 9 lines
Commit
6ef823fdadded '-nodefaults' to the qemu args created by libxl, which is a good step in restricting qemu's default configuration. This change takes another step by adding -no-user-config, which ignores any user-provided config files in sysconfdir. Together, -nodefaults and -no-user-config allow Xen to avoid unkown and uncontrolled qemu configuration.Both options are also added to the qemu invocation in the xen-qemu-dom0-disk-backend systemd service file.
Queued, thanks. Also listed for backport.
I found this on my backport todo list. Thinking about it, I have had second thoughts.
Quoted 6 lines
I worry that existing users of stable branches might be relying on the user config feature (for example by dropping qemu configuration in ~root). If they are, then applying this would break things for them.
It's not a security problem because in xen the configuration in question would have to come from ~root.
Good point.
Quoted 2 lines
So I think, probably, that we should leave this be (ie, not backport the patch). Does anyone want to try to change my mind ?
I never asked for a backport, so have no incentive to change your mind. Plus, I agree with your comment.
Regards,
Jim
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel