]> xenbits.xensource.com Git - libvirt.git/commitdiff
locking: restrict sockets to mode 0600
authorDaniel P. Berrangé <berrange@redhat.com>
Tue, 30 Apr 2019 15:51:37 +0000 (16:51 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 21 May 2019 12:05:00 +0000 (13:05 +0100)
The virtlockd daemon's only intended client is the libvirtd daemon. As
such it should never allow clients from other user accounts to connect.
The code already enforces this and drops clients from other UIDs, but
we can get earlier (and thus stronger) protection against DoS by setting
the socket permissions to 0600

Fixes CVE-2019-10132

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/locking/virtlockd-admin.socket.in
src/locking/virtlockd.socket.in

index 2a7500f3d00782a2ae6372286a0a64ac4f84a586..f674c492f76a4edde786a28ca681682fb17505d5 100644 (file)
@@ -5,6 +5,7 @@ Before=libvirtd.service
 [Socket]
 ListenStream=@localstatedir@/run/libvirt/virtlockd-admin-sock
 Service=virtlockd.service
+SocketMode=0600
 
 [Install]
 WantedBy=sockets.target
index 45e0f202353b48b9185b7b68a132cab17b70e43d..d701b27516a279ef4c031fcdbf17a450bdabb45a 100644 (file)
@@ -4,6 +4,7 @@ Before=libvirtd.service
 
 [Socket]
 ListenStream=@localstatedir@/run/libvirt/virtlockd-sock
+SocketMode=0600
 
 [Install]
 WantedBy=sockets.target