Skip to contentSkip to conversation

docs: migration: Clarify the security posture

PATCH In review Fabiano Rosas 3 participants 3 messages Nov 20 – Nov 22

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: migration: Clarify the security posture

We have documented[0] the scenarios in which a migration bug is considered for a security vulnerability but some ambiguity still remains, mostly because of the mention of live migration in the untrusted entities list. Remove that mention and expand the "Security boundary scope" and "Sensitive configurations" sections with migration content.

0 - commit 8b6405a493a ("docs: Add security considerations for migration")

---
 docs/system/security.rst | 39 ++++++++++++++++++++++++++++++++-------
 1 file changed, 32 insertions(+), 7 deletions(-)
docs/system/security.rst +32 -7
index c0254fef113..a41b84ea70d 100644
@@ -28,7 +28,7 @@ malicious:
 
 - Guest
 - User-facing interfaces (e.g. VNC, SPICE, WebSocket)
-- Network protocols (e.g. NBD, live migration)
+- Network protocols (e.g. NBD)
 - User-supplied files (e.g. disk images, kernels, device trees)
 - Passthrough devices (e.g. PCI, USB)
 
@@ -136,12 +136,17 @@ an issue as a normal bug.
 * **migration/snapshots**. Migration failures and snapshot load
   failures are considered part of normal operation as long as the
   source virtual machine and savevm file, respectively, are still
-  functional. Aborting the QEMU process at the migration/snapshot
-  destination is similarly not considered a security issue. The
-  migration stream is assumed to be secure as long as the design
-  principles described in the Architecture section are held, in
-  which case plain manipulation of the stream is not considered as
-  an attack vector.
+  functional.
+  Aborts, crashes or misbehaviour of the destination QEMU due to an
+  externally manipulated migration stream are bugs, but not security
+  issues. The user must deploy QEMU following the design principles
+  described in the Architecture section to ensure that the migration
+  stream is not compromised. Manipulation of a plain-text stream is
+  not considered to be an attack vector.
+  A crash of the destination QEMU that can be triggered by a guest
+  manipulating a device on the source QEMU before or during a
+  migration may be a security issue, if it meets the other documented
+  criteria for security issues.
 
 * **uninitialized stack variables**. If the bug scenario relies on
   undefined behaviour from stack variables that lack explicit
@@ -343,3 +348,23 @@ authenticated client to send the bytes that will trigger any QEMU
 misbehavior.  Use of a hardened connection is therefore an
 environmental factor used in determining the risk and severity of a
 network-triggered bug.
+
+Migration (including live updates and snapshots)
+''''''''''''''''''''''''''''''''''''''''''''''''
+
+The act of moving a guest around via the various migration mechanisms
+requires careful consideration of security boundaries being crossed.
+A live migration must only be allowed to occur if measures are in
+place to secure the transport being used against access or
+modification. In some configurations QEMU supports encryption of the
+migration stream. For setups that don't make use of this feature, it's
+the network owner's responsibility to provide proper isolation.
+
+For the non-live modalities such as snapshots, the media used to store
+the migration data (e.g. qcow2 file) must be accessible only to the
+entity in control of the migration infrastructure (e.g. cloud
+administrator or virtual machine management software). The guest owner
+is explicitly excluded in order to safeguard the infrastructure
+provider as well as avoid security policy conflicts. Moreover, end
+users operating QEMU directly should take care to only load a snapshot
+or migration from media originating from a trusted source.
Signature · 1 line
2.53.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Fabiano Rosas

We have documented[0] the scenarios in which a migration bug is considered for a security vulnerability but some ambiguity still remains, mostly because of the mention of live migration in the untrusted entities list. Remove that mention and expand the "Security boundary scope" and "Sensitive configurations" sections with migration content.

0 - commit 8b6405a493a ("docs: Add security considerations for migration")

Signature · 1 line
Peter Xu
#2 lore raw
In reply to Fabiano Rosas
Quoted 39 lines · Fabiano Rosas

We have documented[0] the scenarios in which a migration bug is considered for a security vulnerability but some ambiguity still remains, mostly because of the mention of live migration in the untrusted entities list. Remove that mention and expand the "Security boundary scope" and "Sensitive configurations" sections with migration content.

0 - commit 8b6405a493a ("docs: Add security considerations for migration")

---
 docs/system/security.rst | 39 ++++++++++++++++++++++++++++++++-------
 1 file changed, 32 insertions(+), 7 deletions(-)
docs/system/security.rst +2 -7
index c0254fef113..a41b84ea70d 100644
@@ -28,7 +28,7 @@ malicious:
 
 - Guest
 - User-facing interfaces (e.g. VNC, SPICE, WebSocket)
-- Network protocols (e.g. NBD, live migration)
+- Network protocols (e.g. NBD)
 - User-supplied files (e.g. disk images, kernels, device trees)
 - Passthrough devices (e.g. PCI, USB)
 
@@ -136,12 +136,17 @@ an issue as a normal bug.
 * **migration/snapshots**. Migration failures and snapshot load
   failures are considered part of normal operation as long as the
   source virtual machine and savevm file, respectively, are still
-  functional. Aborting the QEMU process at the migration/snapshot
-  destination is similarly not considered a security issue. The
-  migration stream is assumed to be secure as long as the design
-  principles described in the Architecture section are held, in
-  which case plain manipulation of the stream is not considered as
-  an attack vector.
+  functional.

docs/system/security.rst an issue as a normal bug. · line 149

Quoted 10 lines
docs/system/security.rst +10 -0
+  Aborts, crashes or misbehaviour of the destination QEMU due to an
+  externally manipulated migration stream are bugs, but not security
+  issues. The user must deploy QEMU following the design principles
+  described in the Architecture section to ensure that the migration
+  stream is not compromised. Manipulation of a plain-text stream is
+  not considered to be an attack vector.
+  A crash of the destination QEMU that can be triggered by a guest
+  manipulating a device on the source QEMU before or during a
+  migration may be a security issue, if it meets the other documented
+  criteria for security issues.

Personally I thought that making this three sub bullet points (splitting "normal" from "bug" from "maybe security issue") was clearer than having it be a single paragraph of text.

thanks
-- PMM