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 981031 - Can't run pcsd with systemd due to avc denials
Summary: Can't run pcsd with systemd due to avc denials
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: selinux-policy
Version: 7.0
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-03 20:04 UTC by Chris Feist
Modified: 2014-06-18 02:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 09:49:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Chris Feist 2013-07-03 20:04:44 UTC
Description of problem:


Version-Release number of selected component (if applicable):
selinux-policy-mls-3.12.1-52.el7.noarch
libselinux-utils-2.1.13-15.el7.x86_64
libselinux-2.1.13-15.el7.x86_64
libselinux-python-2.1.13-15.el7.x86_64
selinux-policy-targeted-3.12.1-52.el7.noarch
selinux-policy-3.12.1-52.el7.noarch
pcs-0.9.49-3.el7.x86_64


How reproducible:
Always

Steps to Reproduce:
1. systemctl start pcsd.service
2. Following AVC's show up until it fails
type=AVC msg=audit(1372881777.211:1752): avc:  denied  { read } for  pid=20947 comm="systemd-notify" path="/var/log/pcsd/pcsd-main.log" dev="dm-1" ino=3145740 scontext=system_u:system_r:systemd_notify_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file
type=SYSCALL msg=audit(1372881777.211:1752): arch=c000003e syscall=59 success=yes exit=0 a0=23841a8 a1=3087cc8 a2=23c0640 a3=0 items=0 ppid=20942 pid=20947 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="systemd-notify" exe="/usr/bin/systemd-notify" subj=system_u:system_r:systemd_notify_t:s0 key=(null)
type=AVC msg=audit(1372881777.216:1753): avc:  denied  { create } for  pid=20947 comm="systemd-notify" scontext=system_u:system_r:systemd_notify_t:s0 tcontext=system_u:system_r:systemd_notify_t:s0 tclass=unix_dgram_socket
type=SYSCALL msg=audit(1372881777.216:1753): arch=c000003e syscall=41 success=no exit=-13 a0=1 a1=80002 a2=0 a3=1 items=0 ppid=20942 pid=20947 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm="systemd-notify" exe="/usr/bin/systemd-notify" subj=system_u:system_r:systemd_notify_t:s0 key=(null)
type=SERVICE_START msg=audit(1372881866.102:1754): pid=1 uid=0 auid=4294967295 ses=4294967295  subj=system_u:system_r:init_t:s0 msg=' comm="pcsd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'


/var/log/pcsd/pcsd-main.log is the location where all logging is done.

Comment 2 Milos Malik 2013-07-04 07:18:11 UTC
I see the same AVCs in enforcing mode:
----
type=PATH msg=audit(07/04/2013 09:12:56.364:2749) : item=1 name=(null) inode=6424216 dev=08:04 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:ld_so_t:s0 
type=PATH msg=audit(07/04/2013 09:12:56.364:2749) : item=0 name=/bin/systemd-notify inode=6424890 dev=08:04 mode=file,755 ouid=root ogid=root rdev=00:00 obj=system_u:object_r:systemd_notify_exec_t:s0 
type=CWD msg=audit(07/04/2013 09:12:56.364:2749) :  cwd=/var/lib/pcsd 
type=EXECVE msg=audit(07/04/2013 09:12:56.364:2749) : argc=2 a0=systemd-notify a1=--ready 
type=SYSCALL msg=audit(07/04/2013 09:12:56.364:2749) : arch=x86_64 syscall=execve success=yes exit=0 a0=0x288d870 a1=0x3266228 a2=0x28a3380 a3=0x0 items=2 ppid=26944 pid=26949 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root ses=unset tty=(none) comm=systemd-notify exe=/usr/bin/systemd-notify subj=system_u:system_r:systemd_notify_t:s0 key=(null) 
type=AVC msg=audit(07/04/2013 09:12:56.364:2749) : avc:  denied  { read } for  pid=26949 comm=systemd-notify path=/var/log/pcsd/pcsd-main.log dev="sda4" ino=1968087 scontext=system_u:system_r:systemd_notify_t:s0 tcontext=system_u:object_r:var_log_t:s0 tclass=file 
----
type=SYSCALL msg=audit(07/04/2013 09:12:56.366:2750) : arch=x86_64 syscall=socket success=no exit=-13(Permission denied) a0=local a1=SOCK_DGRAM a2=ip a3=0x1 items=0 ppid=26944 pid=26949 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root ses=unset tty=(none) comm=systemd-notify exe=/usr/bin/systemd-notify subj=system_u:system_r:systemd_notify_t:s0 key=(null) 
type=AVC msg=audit(07/04/2013 09:12:56.366:2750) : avc:  denied  { create } for  pid=26949 comm=systemd-notify scontext=system_u:system_r:systemd_notify_t:s0 tcontext=system_u:system_r:systemd_notify_t:s0 tclass=unix_dgram_socket 
----

# systemctl --system daemon-reload
# rpm -qf /var/lib/pcsd
pcs-0.9.49-3.el7.x86_64
# rm -f /var/log/pcsd/pcsd-main.log
# service pcsd restart
Redirecting to /bin/systemctl restart  pcsd.service
(long pause)
Job for pcsd.service failed. See 'systemctl status pcsd.service' and 'journalctl -xn' for details.
# service pcsd status
Redirecting to /bin/systemctl status  pcsd.service
pcsd.service - PCS GUI and remote configuration interface
   Loaded: loaded (/usr/lib/systemd/system/pcsd.service; disabled)
   Active: failed (Result: timeout) since Thu 2013-07-04 09:14:26 CEST; 2min 2s ago
 Main PID: 26939
   CGroup: name=systemd:/system/pcsd.service

Jul 04 09:14:26 rhel70 systemd[1]: pcsd.service operation timed out. Termin...g.
Jul 04 09:14:26 rhel70 systemd[1]: Failed to start PCS GUI and remote confi...e.
Jul 04 09:14:26 rhel70 systemd[1]: Unit pcsd.service entered failed state.
# ls -Z /var/log/pcsd/
-rw-------. root root system_u:object_r:var_log_t:s0   pcsd-main.log
#

Comment 3 Miroslav Grepl 2013-07-04 14:49:05 UTC
Milos,

# ps -eZ |grep initrc


I guess we need a policy for pcs.

Comment 4 Milos Malik 2013-07-04 15:05:33 UTC
system_u:system_r:init_t:s0     root      4543     1  0 17:03 ?        00:00:00 /bin/sh /usr/lib/pcsd/pcsd start
system_u:system_r:initrc_t:s0   root      4547  4543  0 17:03 ?        00:00:00 /bin/bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/bin/ruby -I/usr/lib/pcsd /usr/lib/pcsd/ssl.rb
system_u:system_r:initrc_t:s0   root      4548  4547  0 17:03 ?        00:00:00 /usr/bin/ruby -I/usr/lib/pcsd /usr/lib/pcsd/ssl.rb

Comment 5 Miroslav Grepl 2013-07-22 06:38:12 UTC
commit 13c669ceeb1e092e031cd8edd6fcf059f2471398
Author: Miroslav Grepl <mgrepl>
Date:   Mon Jul 22 08:34:41 2013 +0200

    Add labeling for /usr/lib/pcsd/pcsd

commit 4415f79a5912a884b5cf57fe901cfaf4a0b28291
Author: Miroslav Grepl <mgrepl>
Date:   Mon Jul 22 08:30:07 2013 +0200

    Add labeling for /var/log/pcsd

commit dd6e7e4533e1f58fe102b78a2d9f1bf9aec09eff
Author: Miroslav Grepl <mgrepl>
Date:   Mon Jul 22 08:28:36 2013 +0200

    Add support for pcs which is a corosync and pacemaker configuration tool

Comment 7 Ludek Smid 2014-06-13 09:49:16 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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