Hide Forgot
Created attachment 524902 [details] avc-s selinux is denying which should be allowed Hi, Sorry about this, esp. after you just having fixed bug 737790, well at least I'm learning and filing bugs before QA hits them now. spice-vdagent has grown the capability to generate xorg.conf files, this may seem weird, but it is needed for multi monitor linux guests, since this uses Xinerama and that needs an xorg.conf, for more details see bug 740851. This capability requires the vdagentd process to read some files under sysfs (to get some pci device info through libpciaccess), which selinux currently is denying it. I've run some tests with enforcing on / off. I'm going to attach 2 files, one named denied, this files contains things which selinux is denying which are breaking the new functionality. After running this through audit2allow everything works fine with selinux in enforcing mode. The second file is called silence, this contains some denies which selinux is denying which are ok to deny, but it would be nice if the avc logging for these denies could be silenced. Note I tested this with an F-16 guest, I'll go and update my RHEL-6 guest to the latest 6.2 bits and reproduce it there, but I don't expect any different results. Thanks, Hans
Created attachment 524903 [details] avc-s selinux is denying which should not be logged (silenced)
Ok, any idea why sys_admin capability is needed? CAP_SYS_ADMIN * Perform a range of system administration operations including: quotactl(2), mount(2), umount(2), swapon(2), swapoff(2), sethostname(2), and setdo‐ mainname(2); * perform IPC_SET and IPC_RMID operations on arbi‐ trary System V IPC objects; * perform operations on trusted and security Extended Attributes (see attr(5)); * use lookup_dcookie(2); * use ioprio_set(2) to assign IOPRIO_CLASS_RT and (before Linux 2.6.25) IOPRIO_CLASS_IDLE I/O sched‐ uling classes; * forge UID when passing socket credentials; * exceed /proc/sys/fs/file-max, the system-wide limit on the number of open files, in system calls that open files (e.g., accept(2), execve(2), open(2), pipe(2)); * employ CLONE_NEWNS flag with clone(2) and unshare(2); * perform KEYCTL_CHOWN and KEYCTL_SETPERM keyctl(2) operations; * perform madvise(2) MADV_HWPOISON operation.
(In reply to comment #2) > Ok, any idea why sys_admin capability is needed? No clue, I'm pretty sure this is coming from libpciaccess. Note that it is not *needed* it is trying to do something which needs it but if that fails it goes on happily. I only ran the denied attachment through audit2allow (and loaded the resulting module) and that was enough. I deliberately did not run the other avc's through audit2allow as I didn't see how / why libpciaccess needs them for just enumerating, and indeed things work fine in enforcing mode with those being denied. I guess it may have something to do with libpciaccess being meant to actually do pci device access (think iopl for example), while I'm only using it for enumeration.
Ok lets dontaudit and see if anyone complains.
Fixed in selinux-policy-3.7.19-114.el6
I am fixing the interface.
Fixed in selinux-policy-3.7.19-115.el6
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1511.html