Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Since updating to RHEL 7.4 which contains a keepalived update from 1.2.x
to 1.3.x, the following SELinux related message shows up:
type=AVC msg=audit(1501671861.845:45): avc: denied { search } for pid=2154 comm="keepalived" name="net" dev="proc" ino=9992 scontext=system_u:system_r:keepalived_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir
type=SYSCALL msg=audit(1501671861.845:45): arch=c000003e syscall=2 success=no exit=-13 a0=5623b7fa8330 a1=0 a2=5623b7fa834c a3=63 items=0 ppid=2152 pid=2154 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="keepalived" exe="/usr/sbin/keepalived" subj=system_u:system_r:keepalived_t:s0 key=(null)
type=PROCTITLE msg=audit(1501671861.845:45): proctitle=2F7573722F7362696E2F6B656570616C69766564002D44
Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-166.el7.noarch
selinux-policy-targeted-3.13.1-166.el7.noarch
keepalived-1.3.5-1.el7.x86_64
How reproducible:
Everytime during boot when keepalived gets started.
Actual results:
AVC denied related to keepalived 1.3.x, /proc and sysctl_net_t.
Expected results:
No AVC denied related to keepalived 1.3.x, /proc and sysctl_net_t, but I
am not sure if this should be allowed or not (currently not allowed).
I assume that the AVC in comment#0 talks about /proc/sys/net directory.
There is a lot of files and directories under /proc/sys/net, all of them are labeled sysctl_net_t except for:
# ls -Z /proc/sys/net/unix
-rw-r--r--. root root system_u:object_r:sysctl_net_unix_t:s0 max_dgram_qlen
#
Based on SELinux denials from comment#0 and comment#4, keepalived wants to search something under /proc/sys/net. Even if keepalived found the right file, it would not be able to read it, because the policy does not allow keepalived to read any files under /proc/sys/net. Therefore I believe that following rule should be also added to the policy:
allow keepalived_t sysctl_net_t : file { getattr open read } ;
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-2018:0763
Description of problem: Since updating to RHEL 7.4 which contains a keepalived update from 1.2.x to 1.3.x, the following SELinux related message shows up: type=AVC msg=audit(1501671861.845:45): avc: denied { search } for pid=2154 comm="keepalived" name="net" dev="proc" ino=9992 scontext=system_u:system_r:keepalived_t:s0 tcontext=system_u:object_r:sysctl_net_t:s0 tclass=dir type=SYSCALL msg=audit(1501671861.845:45): arch=c000003e syscall=2 success=no exit=-13 a0=5623b7fa8330 a1=0 a2=5623b7fa834c a3=63 items=0 ppid=2152 pid=2154 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="keepalived" exe="/usr/sbin/keepalived" subj=system_u:system_r:keepalived_t:s0 key=(null) type=PROCTITLE msg=audit(1501671861.845:45): proctitle=2F7573722F7362696E2F6B656570616C69766564002D44 Version-Release number of selected component (if applicable): selinux-policy-3.13.1-166.el7.noarch selinux-policy-targeted-3.13.1-166.el7.noarch keepalived-1.3.5-1.el7.x86_64 How reproducible: Everytime during boot when keepalived gets started. Actual results: AVC denied related to keepalived 1.3.x, /proc and sysctl_net_t. Expected results: No AVC denied related to keepalived 1.3.x, /proc and sysctl_net_t, but I am not sure if this should be allowed or not (currently not allowed).