- 10 1月, 2019 1 次提交
-
-
由 Andrea Bolognani 提交于
These files need to be installed on the system for apparmor support to work, so they don't belong with examples. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NErik Skultety <eskultet@redhat.com>
-
- 27 8月, 2018 1 次提交
-
-
由 Christian Ehrhardt 提交于
Due to kernel upstream change 338d0be4 ("apparmor: fix ptrace read check") libvirt now hits apparmor denies like: apparmor="DENIED" operation="ptrace" profile="/usr/sbin/libvirtd" pid=4409 comm="libvirtd" requested_mask="read" denied_mask="read" peer="libvirt-14e92a75-7668-4b97-8f92-322fc1b9c78a" Extend the ptrace rule to also allow 'ptrace (read)' for libvirtd to work with these newer kernels. Fixes: https://bugs.launchpad.net/bugs/1788603Reported-by: NThadeu Lima de Souza Cascardo <thadeu.cascardo@canonical.com> Reviewed-by: NErik Skultety <eskultet@redhat.com> Acked-by: NJamie Strandboge <jamie@canonical.com> Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
- 16 8月, 2018 3 次提交
-
-
由 Christian Ehrhardt 提交于
Libvirt now tries to preserve all mounts under /dev in qemu namespaces. The old rules only listed a set of known paths but those are no more enough. I found some due to containers like /dev/.lxc/* and such but also /dev/console and /dev/net/tun. Libvirt is correct to do so, but we can no more predict the names properly, so we modify the rule to allow a wildcard based pattern matching what libvirt does. Acked-by: NJamie Strandboge <jamie@canonical.com> Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
由 Christian Ehrhardt 提交于
If a guest runs unconfined <seclabel type='none'>, but libvirtd is confined then the peer for signal can only be detected as 'unconfined'. That triggers issues like: apparmor="DENIED" operation="signal" profile="/usr/sbin/libvirtd" pid=22395 comm="libvirtd" requested_mask="send" denied_mask="send" signal=term peer="unconfined" To fix this add unconfined as an allowed peer for those operations. I discussed with the apparmor folks, right now there is no better separation to be made in this case. But there might be further down the road with "policy namespaces with scope and view control + stacking" This is more a use-case addition than a fix to the following two changes: - 3b1d19e6 AppArmor: add rules needed with additional mediation features - b482925c apparmor: support ptrace checks Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Acked-by: NJamie Strandboge <jamie@canonical.com> Acked-by: Nintrigeri <intrigeri+libvirt@boum.org>
-
由 Christian Ehrhardt 提交于
virt-manager's UI connection will need socket access for openGraphicsFD to work - otherwise users will face a failed connection error when opening the UI view. Depending on the exact versions of libvirt and qemu involved this needs either a rule from qemu to libvirt or vice versa. Acked-by: NJamie Strandboge <jamie@canonical.com> Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
- 12 4月, 2018 1 次提交
-
-
由 Christian Ehrhardt 提交于
Due to mediation of socket and signal activity currently qemu:///session connections calling qemu_bridge_helper fail. We need the profile for libvirtd itself and the subprofile for qemu-bridge-helper to be able to talk/notify to each other via unix socket and signals. Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1754871Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Acked-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 2月, 2018 1 次提交
-
-
由 Guido Günther 提交于
Otherwise stopping domains with qemu://session fails like [164012.338157] audit: type=1400 audit(1516202208.784:99): apparmor="DENIED" operation="signal" profile="/usr/sbin/libvirtd" pid=18835 comm="libvirtd" requested_mask="send" denied_mask="send" signal=term peer="unconfined"
-
- 17 1月, 2018 1 次提交
-
-
由 intrigeri 提交于
/usr/bin/qemu-system-x86_64 -S -no-user-config -nodefaults -nographic -machine none,accel=kvm:tcg -qmp unix:/var/lib/libvirt/qemu/capabilities.monitor.sock,server,nowait -pidfile /var/lib/libvirt/qemu/capabilities.pidfile -daemonize libvirtd needs to be allowed to kill these processes, otherwise they remain running.
-
- 09 1月, 2018 1 次提交
-
-
由 Jamie Strandboge 提交于
This is required for the ebtables functionality added in libvirt 0.8.0. Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
- 03 1月, 2018 1 次提交
-
-
由 Christian Ehrhardt 提交于
On live migration with --p2p like: $ virsh migrate --live --p2p kvmguest-bionic-normal \ qemu+ssh://10.6.221.80/system We hit an apparmor deny like: apparmor="DENIED" operation="file_inherit" profile="/usr/sbin/libvirtd" pid=23477 comm="ssh" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send" addr=none peer_addr=none peer="unconfined" The rule is not perfect, but can't be restricted further at the moment (new upstream kernel features needed). For now the lack of a profile on the peer as well as comm not being a conditional on rules do not allow to filter further. Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com>
-
- 20 11月, 2017 2 次提交
-
-
由 intrigeri 提交于
This set of rules was proposed by Christian Boltz <apparmor@cboltz.de> on https://bugzilla.opensuse.org/show_bug.cgi?id=1065123.
-
由 intrigeri 提交于
-
- 07 10月, 2017 1 次提交
-
-
由 Jim Fehlig 提交于
Commit b482925c added ptrace rule for the apparmor profiles, but one was missed in the libvirtd profile for dnsmasq. It was overlooked since the test machine did not have an active libvirt network requiring dnsmasq that was also set to autostart. With one active and set to autostart, the following denial is observed in audit.log when restarting libvirtd type=AVC msg=audit(1507320136.306:298): apparmor="DENIED" \ operation="ptrace" profile="/usr/sbin/libvirtd" pid=5472 \ comm="libvirtd" requested_mask="trace" denied_mask="trace" \ peer="/usr/sbin/dnsmasq" With an active network, I suspect a libvirtd restart causes access to /proc/<dnsmasq-pid>/*, hence the resulting denial. As a nasty side affect of the denial, libvirtd thinks it needs to spawn a dnsmasq process even though one is already running for the network. E.g. after two libvirtd restarts dnsmasq 1683 0.0 0.0 51188 2612 ? S 12:03 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 1684 0.0 0.0 51160 576 ? S 12:03 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper dnsmasq 4706 0.0 0.0 51188 2572 ? S 13:54 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 4707 0.0 0.0 51160 572 ? S 13:54 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper dnsmasq 4791 0.0 0.0 51188 2580 ? S 13:56 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper root 4792 0.0 0.0 51160 572 ? S 13:56 0:00 \ /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf \ --leasefile-ro --dhcp-script=/usr/lib64/libvirt/libvirt_leaseshelper A simple fix is to add a ptrace rule for dnsmasq. Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-By: NGuido Günther <agx@sigxcpu.org>
-
- 25 9月, 2017 1 次提交
-
-
由 Jim Fehlig 提交于
Kernel 4.13 introduced finer-grained ptrace checks https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.13.2&id=290f458a4f16f9cf6cb6562b249e69fe1c3c3a07 With kernel 4.13 and apparmor 2.11, simply starting libvirtd results in the following apparmor denial type=AVC msg=audit(1506112085.645:954): apparmor="DENIED" operation="ptrace" profile="/usr/sbin/libvirtd" pid=6984 comm="libvirtd" requested_mask="trace" denied_mask="trace" peer="unconfined" Attempting to start an unconfined domain results in type=AVC msg=audit(1506112301.227:1112): apparmor="DENIED" operation="ptrace" profile="/usr/sbin/libvirtd" pid=7498 comm="libvirtd" requested_mask="trace" denied_mask="trace" peer="/usr/sbin/libvirtd" And attempting to start a confined domain results in type=AVC msg=audit(1506112631.408:1312): apparmor="DENIED" operation="open" profile="virt-aa-helper" name="/etc/libnl/classid" pid=8283 comm="virt-aa-helper" requested_mask="r" denied_mask="r" fsuid=0 ouid=0 type=AVC msg=audit(1506112631.530:1319): apparmor="DENIED" operation="open" profile="virt-aa-helper" name="/etc/libnl/classid" pid=8289 comm="virt-aa-helper" requested_mask="r" denied_mask="r" fsuid=0 ouid=0 type=AVC msg=audit(1506112632.186:1324): apparmor="DENIED" operation="ptrace" profile="/usr/sbin/libvirtd" pid=8342 comm="libvirtd" requested_mask="trace" denied_mask="trace" peer="libvirt-66154842-e926-4f92-92f0-1c1bf61dd1ff" Add ptrace rules to allow the trace operations. Resolves: https://bugzilla.suse.com/show_bug.cgi?id=1058847Signed-off-by: NJim Fehlig <jfehlig@suse.com> Reviewed-by: NGuido Günther <agx@sigxcpu.org>
-
- 16 6月, 2017 1 次提交
-
-
由 Stefan Bader 提交于
On Debian/Ubuntu the libxl-save-helper (used when saving/restoring a domain through libxl) is located under /usr/lib/xen-<version>/bin. Bug-Ubuntu: https://bugs.launchpad.net/bugs/1334195Signed-off-by: NChristian Ehrhardt <christian.ehrhardt@canonical.com> Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
-
- 17 3月, 2017 1 次提交
-
-
由 Guido Günther 提交于
This is where e.g. Debian puts it.
-
- 21 12月, 2016 1 次提交
-
-
由 Guido Günther 提交于
to cure + virsh lxc-enter-namespace --noseclabel sl /bin/ls /bin/ls libvirt: error : Expected at least one file descriptor error: internal error: Child process (2714) unexpected exit status 125 caused by apparmor="DENIED" operation="open" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/libvirtd" name="" pid=1422 comm="libvirtd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
-
- 12 12月, 2016 1 次提交
-
-
由 intrigeri 提交于
Acked-by: NChristian Ehrhardt <christian.ehrhardt@canonical.co>
-
- 26 9月, 2016 1 次提交
-
-
由 Cédric Bosdonnat 提交于
qemu-bridge-helper is only called from libvirtd, it has to be moved from the qemu domain abstraction to the usr.sbin.libvirtd profile.
-
- 12 6月, 2016 1 次提交
-
-
由 Guido Günther 提交于
otherwise we drop variables like XDG_RUNTIME_DIR with qemu:///session and libvirtd faild to find virtlogd's socket.
-
- 23 1月, 2015 3 次提交
-
-
由 Mike Latimer 提交于
Apparmor must not prevent access to required helper programs. The following helpers should be allowed to run in unconfined execution mode: - libvirt_parthelper - libvirt_iohelper
-
由 Mike Latimer 提交于
The network and nwfilter tests contained in the libvirt-TCK testkit can fail unless access to raw network packets is granted. Without this access, the following apparmor error can be seen while running the tests: apparmor="DENIED" operation="create" parent=1 profile="/usr/sbin/libvirtd" pid=94731 comm="libvirtd" family="packet" sock_type="raw" protocol=768
-
由 Mike Latimer 提交于
In order for apparmor to work properly in Xen environments, the following access rights need to be allowed: - Allow CAP_SYS_PACCT, which is required when resetting some multi-port Broadcom cards by writting to the PCI config space - Allow CAP_IPC_LOCK, which is required to lock/unlock memory. Without this setting, an error 'Resource temporarily unavailable' can be seen while attempting to mmap memory. At the same time, the following apparmor message is seen: apparmor="DENIED" operation="capable" parent=1 profile="/usr/sbin/libvirtd" pid=2097 comm="libvirtd" pid=2097 comm="libvirtd" capability=14 capname="ipc_lock" - Allow access to distribution specific directories: /usr/{lib,lib64}/xen/bin
-
- 05 1月, 2015 1 次提交
-
-
由 Cedric Bosdonnat 提交于
The apparmor profiles forgot about /usr/lib64 folders, just add lib64 as a possible alternative to lib in the paths
-
- 27 3月, 2014 1 次提交
-
-
由 Cédric Bosdonnat 提交于
See lp#1276719 for the bug description. As virt-aa-helper doesn't know the VFIO groups to use for the guest, allow access to all /dev/vfio/[0-9]* and /dev/vfio/vfio files if there is a potential need for vfio Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 08 2月, 2014 1 次提交
-
-
由 Felix Geyer 提交于
Tested on Debian unstable. The profile updates are partly taken from the Ubuntu trusty libvirt package. Signed-off-by: NGuido Günther <agx@sigxcpu.org>
-
- 07 4月, 2010 1 次提交
-
-
由 Jamie Strandboge 提交于
* examples/apparmor/libvirt-qemu examples/apparmor/usr.sbin.libvirtd examples/apparmor/usr.lib.libvirt.virt-aa-helper: Update the examples
-
- 13 11月, 2009 1 次提交
-
-
由 Jamie Strandboge 提交于
* examples/apparmor/libvirt-qemu: adds pulseaudio, alsa and preliminary save/restore to the example apparmor abstraction * examples/apparmor/usr.sbin.libvirtd: allows libvirtd access to inet dgram, inet6 dgram, inet6 stream and /usr/lib/libvirt/*
-
- 08 10月, 2009 1 次提交
-
-
由 Jamie Strandboge 提交于
* docs/drvqemu.html.in: include documentation for AppArmor sVirt confinement * examples/apparmor/TEMPLATE examples/apparmor/libvirt-qemu examples/apparmor/usr.lib.libvirt.virt-aa-helper examples/apparmor/usr.sbin.libvirtd: example templates and configuration files for SVirt Apparmor when using KVM/QEmu
-