]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: ensure TLS clients always verify the server certificate
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 5 Oct 2017 16:54:28 +0000 (17:54 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 16 Oct 2017 12:17:20 +0000 (13:17 +0100)
commitdc6c41798d1eb5c52c75365ffa22f7672709dfa7
tree4751ca0d71cd7732634ad4e942e8301bd349f994
parentd83dac00d9d3375b08759ad7422f8b1760a08ba2
qemu: ensure TLS clients always verify the server certificate

The default_tls_x509_verify (and related) parameters in qemu.conf
control whether the QEMU TLS servers request & verify certificates
from clients. This works as a simple access control system for
servers by requiring the CA to issue certs to permitted clients.
This use of client certificates is disabled by default, since it
requires extra work to issue client certificates.

Unfortunately the code was using this configuration parameter when
setting up both TLS clients and servers in QEMU. The result was that
TLS clients for character devices and disk devices had verification
turned off, meaning they would ignore errors while validating the
server certificate.

This allows for trivial MITM attacks between client and server,
as any certificate returned by the attacker will be accepted by
the client.

This is assigned CVE-2017-1000256  / LSN-2017-0002

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit 441d3eb6d1be940a67ce45a286602a967601b157)
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-chardev.args
tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-tlsx509-secret-chardev.args