summaryrefslogtreecommitdiff
path: root/docs/designs
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@citrix.com>2018-11-06 15:41:24 +0000
committerGeorge Dunlap <george.dunlap@citrix.com>2018-11-06 15:41:24 +0000
commit371a23e65db5eb3a80a148586aeb551d4d0015f1 (patch)
tree9f111803377d333029d1488f0eb48c446bc0f4c1 /docs/designs
parent7414750be1fed21687a0a28f67cc2397ebb0d0ba (diff)
tools/dm_restrict: Unshare mount and IPC namespaces on Linux
QEMU running under Xen doesn't need mount or IPC functionality. Create and enter separate namespaces for each of these before executing QEMU, so that in the event that other restrictions fail, the process won't be able to even name system mount points or exsting non-file-based IPC descriptors to attempt to attack them. Unsharing is something a process can only do to itself (it would seem); so add an os-specific "dm_preexec_restrict()" hook just before we exec() the device model. Also add checks to depriv-process-checker.sh to verify that dm is running in a new namespace (or at least, a different one than the caller). Suggested-by: Ross Lagerwall <ross.lagerwall@citrix.com> Signed-off-by: George Dunlap <george.dunlap@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> --- Changes since v4: - Fix function prototype for netbsd code Changes since v3: - Fix some more style issues Changes since v2: - Return an error rather than calling exit() - Use LOGE() and print to the current stderr fd, rather than printing to the new stderr fd via write() - Use r for external return values rather than rc. CC: Ian Jackson <ian.jackson@citrix.com> CC: Wei Liu <wei.liu2@citrix.com> CC: Anthony Perard <anthony.perard@citrix.com>
Diffstat (limited to 'docs/designs')
-rw-r--r--docs/designs/qemu-deprivilege.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/designs/qemu-deprivilege.md b/docs/designs/qemu-deprivilege.md
index 82b0e15d81..65754ba6ee 100644
--- a/docs/designs/qemu-deprivilege.md
+++ b/docs/designs/qemu-deprivilege.md
@@ -76,12 +76,6 @@ Then adds the following to the qemu command-line:
'''Tested''': Not tested
-## Restrictions / improvements still to do
-
-This lists potential restrictions still to do. It is meant to be
-listed in order of ease of implementation, with low-hanging fruit
-first.
-
## Namespaces for unused functionality (Linux only)
'''Description''': QEMU doesn't use the functionality associated with
@@ -109,6 +103,12 @@ call:
[qemu-namespaces]: https://lists.gnu.org/archive/html/qemu-devel/2017-10/msg04723.html
+# Restrictions / improvements still to do
+
+This lists potential restrictions still to do. It is meant to be
+listed in order of ease of implementation, with low-hanging fruit
+first.
+
### Basic RLIMITs
'''Description''': A number of limits on the resources that a given