From c4eedd7930c8428660f3f0cd9e4cd7a872219f6b Mon Sep 17 00:00:00 2001
From: Peter Krempa
Date: Tue, 22 May 2018 14:53:06 +0200
Subject: [PATCH] qemu: domain: Forbid storage with old QCOW2 encryption
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
The encryption was buggy and qemu actually dropped it upstream. Forbid
it for all versions since it would cause other problems too.
Problems with the old encryption include weak crypto, corruption of
images with blockjobs and a lot of usability problems.
This requires changing of the encryption type for the encrypted disk
tests.
Signed-off-by: Peter Krempa
Reviewed-by: Ján Tomko
---
docs/formatdomain.html.in | 4 ++++
docs/formatstorageencryption.html.in | 5 ++---
src/qemu/qemu_domain.c | 10 ++++++++++
tests/qemuxml2argvdata/encrypted-disk-usage.args | 8 +++++++-
tests/qemuxml2argvdata/encrypted-disk-usage.xml | 2 +-
tests/qemuxml2argvdata/encrypted-disk.args | 8 +++++++-
tests/qemuxml2argvdata/encrypted-disk.xml | 2 +-
tests/qemuxml2argvtest.c | 4 ++--
tests/qemuxml2xmloutdata/encrypted-disk.xml | 2 +-
tests/qemuxml2xmltest.c | 4 ++--
10 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 22ef81052d..713d7aa88a 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2974,6 +2974,10 @@
See the
Storage Encryption
page for more information.
+
+ Note that the 'qcow' format of encryption is broken and thus is no
+ longer supported for use with disk images.
+ (Since libvirt 4.5.0)
reservations
Since libvirt 4.4.0, the
diff --git a/docs/formatstorageencryption.html.in b/docs/formatstorageencryption.html.in
index 23efbf932e..434bdb609e 100644
--- a/docs/formatstorageencryption.html.in
+++ b/docs/formatstorageencryption.html.in
@@ -53,9 +53,8 @@
The qcow format specifies that the built-in encryption
support in qcow- or qcow2-formatted volume
images should be used. A single
- <secret type='passphrase'> element is expected. If
- the secret element is not present during volume creation,
- a secret is automatically generated and attached to the volume.
+ <secret type='passphrase'> element is expected. Note
+ that this encryption is inherently broken and should not be used any more.