libvirt/apparmor-no-mount.patch
James Fehlig 803f542a4b Accepting request 567780 from home:jfehlig:branches:Virtualization
- Update to libvirt 4.0.0
  - Many incremental improvements and bug fixes, see
    http://libvirt.org/news.html
  - Dropped patches:
    2d07f1f0-fix-storage-crash.patch,
    69ed99c7-dom0-persistent.patch,
    8599aedd-libvirt-guests-dom0-filter.patch,
    0f33025a-virt-aa-helper-handle-more-disk-images.patch,
    b475a91b-add-virStringFilterChars-string-utility.patch,
    faec1958-lxc-set-hostname-based-on-container-name.patch,
    2089ab21-netserver-close-clients-before-stopping-all-drivers.patch,
    fix-virt-aa-helper-profile.patch,
    suse-apparmor-signal.patch
  - Patches added to fix upstream bugs:
    72adaf2f-revert-qemu-monitor-error-report.patch,
    71d56a39-nodedev-fix-parse-PCI-address.patch
  - CVE-2018-5748, CVE-2017-5715, bsc#1071651

OBS-URL: https://build.opensuse.org/request/show/567780
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=661
2018-01-19 19:16:17 +00:00

47 lines
1.4 KiB
Diff

Index: libvirt-4.0.0/examples/apparmor/libvirt-lxc
===================================================================
--- libvirt-4.0.0.orig/examples/apparmor/libvirt-lxc
+++ libvirt-4.0.0/examples/apparmor/libvirt-lxc
@@ -2,39 +2,15 @@
#include <abstractions/base>
- umount,
-
- # ignore DENIED message on / remount
- deny mount options=(ro, remount) -> /,
-
- # allow tmpfs mounts everywhere
- mount fstype=tmpfs,
-
- # allow mqueue mounts everywhere
- mount fstype=mqueue,
-
- # allow fuse mounts everywhere
- mount fstype=fuse.*,
-
- # deny writes in /proc/sys/fs but allow binfmt_misc to be mounted
- mount fstype=binfmt_misc -> /proc/sys/fs/binfmt_misc/,
+ # deny writes in /proc/sys/fs
deny @{PROC}/sys/fs/** wklx,
- # allow efivars to be mounted, writing to it will be blocked though
- mount fstype=efivarfs -> /sys/firmware/efi/efivars/,
-
# block some other dangerous paths
deny @{PROC}/sysrq-trigger rwklx,
deny @{PROC}/mem rwklx,
deny @{PROC}/kmem rwklx,
- # deny writes in /sys except for /sys/fs/cgroup, also allow
- # fusectl, securityfs and debugfs to be mounted there (read-only)
- mount fstype=fusectl -> /sys/fs/fuse/connections/,
- mount fstype=securityfs -> /sys/kernel/security/,
- mount fstype=debugfs -> /sys/kernel/debug/,
- mount fstype=proc -> /proc/,
- mount fstype=sysfs -> /sys/,
+ # deny writes in /sys
deny /sys/firmware/efi/efivars/** rwklx,
deny /sys/kernel/security/** rwklx,