]> git.ipfire.org Git - thirdparty/libvirt.git/commit
remote: use SocketMode=0600 when polkit is not compiled
authorDaniel P. Berrangé <berrange@redhat.com>
Fri, 7 Aug 2020 12:37:05 +0000 (13:37 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 3 Sep 2020 10:13:25 +0000 (11:13 +0100)
commitb196f8fcdddd08194f267b7a02d8541a653d894a
tree3e6b87a56a311a7f56b4cf6c71ad9a0c8ce48dba
parente6285f84faeacccdef12b69a7bc38975230d6662
remote: use SocketMode=0600 when polkit is not compiled

The systemd .socket unit files we ship for libvirt daemons use
SocketMode=0666 on the assumption that libvirt is built with
polkit which provides access control.

Some people, however, may have explicitly turned off polkit at
build time and not realize that leaves them insecure unless
they also change the SocketMode.  This addresses that problem
by making the SocketMode default to 0600 when polkit is
disabled at compile time.

Note we cannot automatically fix the case where the user
compiles polkit, but then overrides the libvirtd.conf defaults
to disable polkit. This is what lead to CVE-2020-15708 in
Ubuntu 20.10.  We can at least improve the inline comments
in the config file to give a clearer warning though, which
may have helped avoid the mistaken config.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/meson.build
src/remote/libvirtd.conf.in
src/remote/libvirtd.socket.in