RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1440165 - SELinux policy (daemons) changes required for package: sbd - due to enabling block-device support
Summary: SELinux policy (daemons) changes required for package: sbd - due to enabling ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Lukas Vrabec
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-07 12:38 UTC by Klaus Wenninger
Modified: 2017-08-01 15:24 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-142.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 15:24:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1455631 0 high CLOSED sbd daemon can not access /proc/sysrq-trigger 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2017:1861 0 normal SHIPPED_LIVE selinux-policy bug fix update 2017-08-01 17:50:24 UTC

Internal Links: 1455631

Description Klaus Wenninger 2017-04-07 12:38:09 UTC
Description of problem:

Since block-device-support has been enabled in sbd for RHEL-7.4
selinux seems to prevent sbd from accessing the block-device
configured.

Version-Release number of selected component (if applicable):


How reproducible:

100%

Steps to Reproduce:
1. enable block-device-support in an sbd-setup (e.g. set SBD_DEVICE in /etc/sysconfig/sbd)
2. restart sbd-service
3.

Actual results:

Apr 07 12:26:27 rhel73-node1 sbd[17128]:  warning: open_device: Opening
device /dev/vdb failed.

Expected results:

No moaning in logs + smooth operation

Additional info:

running the system in permissive mode sbd doesn't complain

Comment 2 Milos Malik 2017-04-07 13:21:21 UTC
# rpm -qa selinux-policy\*
selinux-policy-targeted-3.13.1-136.el7.noarch
selinux-policy-3.13.1-136.el7.noarch
# grep ^SBD_DEVICE /etc/sysconfig/sbd 
SBD_DEVICE="/dev/vda"
#

Following SELinux denial appeared in enforcing mode:
----
type=SYSCALL msg=audit(04/07/2017 09:15:04.197:491) : arch=x86_64 syscall=open success=no exit=EACCES(Permission denied) a0=0x10d90a0 a1=O_RDWR|O_DSYNC|O_DIRECT|__O_SYNC a2=0x10f0c30 a3=0x8 items=0 ppid=1 pid=22710 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=sbd exe=/usr/sbin/sbd subj=system_u:system_r:sbd_t:s0 key=(null) 
type=AVC msg=audit(04/07/2017 09:15:04.197:491) : avc:  denied  { read write } for  pid=22710 comm=sbd name=vda dev="devtmpfs" ino=8263 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file 
----

Following SELinux denials appeared in permissive mode:
----
type=SYSCALL msg=audit(04/07/2017 09:18:07.917:668) : arch=x86_64 syscall=open success=yes exit=4 a0=0x25160a0 a1=O_RDWR|O_DSYNC|O_DIRECT|__O_SYNC a2=0x252dc30 a3=0x8 items=0 ppid=1 pid=24583 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=sbd exe=/usr/sbin/sbd subj=system_u:system_r:sbd_t:s0 key=(null) 
type=AVC msg=audit(04/07/2017 09:18:07.917:668) : avc:  denied  { open } for  pid=24583 comm=sbd path=/dev/vda dev="devtmpfs" ino=8263 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file 
type=AVC msg=audit(04/07/2017 09:18:07.917:668) : avc:  denied  { read write } for  pid=24583 comm=sbd name=vda dev="devtmpfs" ino=8263 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file 
----
type=SYSCALL msg=audit(04/07/2017 09:18:07.917:669) : arch=x86_64 syscall=ioctl success=yes exit=0 a0=0x4 a1=0x1268 a2=0x61054c a3=0x7ffc6246b9a0 items=0 ppid=1 pid=24583 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=sbd exe=/usr/sbin/sbd subj=system_u:system_r:sbd_t:s0 key=(null) 
type=AVC msg=audit(04/07/2017 09:18:07.917:669) : avc:  denied  { ioctl } for  pid=24583 comm=sbd path=/dev/vda dev="devtmpfs" ino=8263 scontext=system_u:system_r:sbd_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=blk_file 
----

Comment 8 errata-xmlrpc 2017-08-01 15:24:23 UTC
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.

https://access.redhat.com/errata/RHBA-2017:1861


Note You need to log in before you can comment on or make changes to this bug.