Bug 703482
Summary: | enforcing MLS -- AVCs appear when running "kpartx -v /dev/sda" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Milos Malik <mmalik> |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED ERRATA | QA Contact: | Milos Malik <mmalik> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.7 | CC: | dwalsh, jrieden |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-2.4.6-306.el5 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2011-07-21 09:20:15 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Milos Malik
2011-05-10 13:45:31 UTC
ls -lZ /sbin/kpartx If it is not labeled lvm_exec_t can you change its label to this, and try again chcon -t lvm_exec_t /sbin/kpartx Current state: # ls -Z /sbin/kpartx -rwxr-xr-x root root system_u:object_r:sbin_t:SystemLow /sbin/kpartx # matchpathcon /sbin/kpartx /sbn/kpartx system_u:object_r:sbin_t:SystemLow # # chcon -t lvm_exec_t /sbin/kpartx # ls -Z /sbin/kpartx -rwxr-xr-x root root system_u:object_r:lvm_exec_t:SystemLow /sbin/kpartx # setenforce 0 # kpartx -v /dev/sda sda1 : 0 208782 /dev/sda 63 sda2 : 0 488183220 /dev/sda 208845 # setenforce 1 # kpartx -v /dev/sda failed to stat() /dev/sda # # setenforce 1 # semodule -DB # kpartx -v /dev/sda failed to stat() /dev/sda # ausearch -m avc -m user_avc -ts recent ---- time->Thu May 12 03:23:44 2011 type=SYSCALL msg=audit(1305185024.393:194): arch=c000003e syscall=4 success=no exit=-13 a0=7fff915ddd99 a1=7fff915dc700 a2=7fff915dc700 a3=0 items=0 ppid=3647pid=3754 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=ttyS1 ses=2 comm="kpartx" exe="/sbin/kpartx" subj=root:sysadm_r:lvm_t:s0-s15c0.c1023 key=(null) type=AVC msg=audit(1305185024.393:194): avc: denied { getattr } for pid=3754 comm="kpartx" path="/dev/sda" dev=tmpfs ino=1142 scontext=root:sysadm_r:lvm_t:s0-s15:c0.c1023 tcontext=system_u:object_r:fixed_disk_device_t:s15:c0.c1023 tclass=blk_file ---- AFAIK we have the same issue in RHEL6? It is fixed already. Here is the bug report: https://bugzilla.redhat.com/show_bug.cgi?id=681887 I need to backport /sbin/kpartx -- gen_context(system_u:object_r:lvm_exec_t,s0) mls_file_read_all_levels(lvm_t) mls_file_upgrade(lvm_t) and probably other lvm fixes which have been done in RHEL6. Yes Fixed in selinux-policy-2.4.6-306.el5 An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1069.html An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-1069.html |