]> git.ipfire.org Git - thirdparty/libvirt.git/commit
apparmor: fix qemu_bridge_helper for named profile
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 30 Jan 2020 07:12:38 +0000 (08:12 +0100)
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>
Fri, 31 Jan 2020 07:32:00 +0000 (08:32 +0100)
commit5a21fd513adcbd0738bf5528f835083cfb92fc86
treead264d598c7f941359fa870fc932af359d7cece9
parent2b082d875d6c6899ef71024c2efd4380a5678c1e
apparmor: fix qemu_bridge_helper for named profile

Since a3ab6d42 "apparmor: convert libvirtd profile to a named profile"
the detection of the subelement for qemu_bridge_helper is wrong.

In combination with the older 123cc3e1 "apparmor: allow
/usr/lib/qemu/qemu-bridge-helper" it now detects qemu-bridge-helper no
more with its path, but instead as a proper subelement of the named profile
like: label=libvirtd//qemu_bridge_helper

In the same fashion the reverse rule in the qemu_bridge_helper
sub-profile still uses the path and not the named profile label.

Triggering denies like:
apparmor="DENIED" operation="file_inherit"
  profile="libvirtd//qemu_bridge_helper" pid=5629 comm="qemu-bridge-hel"
  family="unix" sock_type="stream" protocol=0 requested_mask="send receive"
  denied_mask="send receive" addr=none peer_addr=none peer="libvirtd"

This patch fixes the unix socket rules for the communication between
libvirtd and qemu-bridge-helper to match that.

Fixes: a3ab6d42d825499af44b8f19f9299e150d9687bc
Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1655111
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
src/security/apparmor/usr.sbin.libvirtd