1. 10 1月, 2019 1 次提交
  2. 27 8月, 2018 1 次提交
  3. 16 8月, 2018 3 次提交
  4. 12 4月, 2018 1 次提交
  5. 07 2月, 2018 1 次提交
  6. 17 1月, 2018 1 次提交
    • I
      On startup libvirtd runs a number of QEMU processes unconfined such as: · 904cdd09
      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.
      904cdd09
  7. 09 1月, 2018 1 次提交
  8. 03 1月, 2018 1 次提交
    • C
      apparmor: allow unix stream for p2p migrations · 8f882cf3
      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>
      8f882cf3
  9. 20 11月, 2017 2 次提交
  10. 07 10月, 2017 1 次提交
    • J
      apparmor: add dnsmasq ptrace rule to libvirtd profile · c44b29aa
      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>
      c44b29aa
  11. 25 9月, 2017 1 次提交
    • J
      apparmor: support ptrace checks · b482925c
      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>
      b482925c
  12. 16 6月, 2017 1 次提交
  13. 17 3月, 2017 1 次提交
  14. 21 12月, 2016 1 次提交
    • G
      apparmor: pass attach_disconnected · 1a9148fb
      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
      1a9148fb
  15. 12 12月, 2016 1 次提交
  16. 26 9月, 2016 1 次提交
  17. 12 6月, 2016 1 次提交
  18. 23 1月, 2015 3 次提交
    • M
      Grant access to helpers · 338b07af
      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
      338b07af
    • M
      Fix apparmor issues for tck · c0273cd6
      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
      c0273cd6
    • M
      Fix apparmor issues for Xen · b61fb8e8
      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
      b61fb8e8
  19. 05 1月, 2015 1 次提交
  20. 27 3月, 2014 1 次提交
  21. 08 2月, 2014 1 次提交
  22. 07 4月, 2010 1 次提交
    • J
      Improve the apparmor example · 2df32060
      Jamie Strandboge 提交于
      * examples/apparmor/libvirt-qemu examples/apparmor/usr.sbin.libvirtd
        examples/apparmor/usr.lib.libvirt.virt-aa-helper: Update the examples
      2df32060
  23. 13 11月, 2009 1 次提交
    • J
      AppArmor updates of examples · a8a560dd
      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/*
      a8a560dd
  24. 08 10月, 2009 1 次提交
    • J
      Documentation and examples for SVirt Apparmor driver · 624a7927
      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
      624a7927