Bug 1474941 - SELinux is preventing sm-notify from using the 'dac_read_search' capabilities.
SELinux is preventing sm-notify from using the 'dac_read_search' capabilities.
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
27
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:9b65680e9108816e0125214400b...
:
Depends On: 1467707
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-25 12:18 EDT by Micah Abbott
Modified: 2017-08-16 15:10 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1467707
Environment:
Last Closed: 2017-08-16 15:10:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Micah Abbott 2017-07-25 12:18:31 EDT
This is also being seen on Fedora Rawhide Atomic Host.

# rpm-ostree status
State: idle
Deployments:
● rawhide:fedora/rawhide/x86_64/atomic-host
                   Version: Rawhide.20170724.n.0 (2017-07-24 11:01:23)
                    Commit: 508fedeefc8c6a00516070a7edacc1c05edd34a3471c1e6ebc3f8bb4f2640f88

# rpm -q selinux-policy
selinux-policy-3.13.1-265.fc27.noarch

# journalctl -b | grep denied
Jul 25 16:07:08 micah-f26ah-vm0725a.localdomain audit[842]: AVC avc:  denied  { dac_read_search } for  pid=842 comm="sm-notify" capability=2  scontext=system_u:system_r:rpcd_t:s0 tcontext=system_u:system_r:rpcd_t:s0 tclass=capability permissive=0
Jul 25 16:07:08 micah-f26ah-vm0725a.localdomain audit[842]: AVC avc:  denied  { dac_read_search } for  pid=842 comm="sm-notify" capability=2  scontext=system_u:system_r:rpcd_t:s0 tcontext=system_u:system_r:rpcd_t:s0 tclass=capability permissive=0
Jul 25 16:07:08 micah-f26ah-vm0725a.localdomain audit[842]: AVC avc:  denied  { dac_read_search } for  pid=842 comm="sm-notify" capability=2  scontext=system_u:system_r:rpcd_t:s0 tcontext=system_u:system_r:rpcd_t:s0 tclass=capability permissive=0
Jul 25 16:07:08 micah-f26ah-vm0725a.localdomain audit[842]: AVC avc:  denied  { dac_read_search } for  pid=842 comm="sm-notify" capability=2  scontext=system_u:system_r:rpcd_t:s0 tcontext=system_u:system_r:rpcd_t:s0 tclass=capability permissive=0



+++ This bug was initially created as a clone of Bug #1467707 +++

Description of problem:
SELinux is preventing sm-notify from using the 'dac_read_search' capabilities.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

If you want to help identify if domain needs this access or you have a file with the wrong permissions on your system
Then turn on full auditing to get path information about the offending file and generate the error again.
Do

Turn on full auditing
# auditctl -w /etc/shadow -p w
Try to recreate AVC. Then execute
# ausearch -m avc -ts recent
If you see PATH record check ownership/permissions on file, and fix it,
otherwise report as a bugzilla.

*****  Plugin catchall (9.59 confidence) suggests   **************************

If you believe that sm-notify should have the dac_read_search capability by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'sm-notify' --raw | audit2allow -M my-smnotify
# semodule -X 300 -i my-smnotify.pp

Additional Information:
Source Context                system_u:system_r:rpcd_t:s0
Target Context                system_u:system_r:rpcd_t:s0
Target Objects                Unknown [ capability ]
Source                        sm-notify
Source Path                   sm-notify
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.18.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.12.0-1.fc27.x86_64 #1 SMP Mon
                              Jul 3 15:45:36 UTC 2017 x86_64 x86_64
Alert Count                   96
First Seen                    2017-05-21 15:22:08 MDT
Last Seen                     2017-07-04 11:27:43 MDT
Local ID                      029d36f3-caa9-4716-a0d5-911df2504d4a

Raw Audit Messages
type=AVC msg=audit(1499189263.81:201): avc:  denied  { dac_read_search } for  pid=2186 comm="sm-notify" capability=2  scontext=system_u:system_r:rpcd_t:s0 tcontext=system_u:system_r:rpcd_t:s0 tclass=capability permissive=0


Hash: sm-notify,rpcd_t,rpcd_t,capability,dac_read_search

Version-Release number of selected component:
selinux-policy-3.13.1-225.18.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.12.0-1.fc27.x86_64
type:           libreport

Potential duplicate: bug 1451381
Comment 1 Jan Kurik 2017-08-15 04:53:35 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.
Comment 2 Viking 2017-08-15 17:17:18 EDT
It now seems to be affecting also Fedora 26.
I am glad to provide additional information if instructed clearly, not a power-user but using Linux as a main/only system 10+ years.

SELinux is preventing sm-notify from using the dac_read_search capability.

*****  Plugin dac_override (91.4 confidence) suggests   **********************

[...]

*****  Plugin catchall (9.59 confidence) suggests   **************************

[...]

Additional Information:
Source Context                system_u:system_r:rpcd_t:s0
Target Context                system_u:system_r:rpcd_t:s0
Target Objects                Unknown [ capability ]
Source                        sm-notify
Source Path                   sm-notify
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-260.3.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 4.12.5-300.fc26.x86_64
                              #1 SMP Mon Aug 7 15:27:25 UTC 2017 x86_64 x86_64
Alert Count                   7
First Seen                    2017-08-15 08:17:17 CDT
Last Seen                     2017-08-15 15:41:54 CDT
Local ID                      

Raw Audit Messages
type=AVC msg=audit(1502829714.878:253): avc:  denied  { dac_read_search } for  pid=2167 comm="sm-notify" capability=2  scontext=system_u:system_r:rpcd_t:s0 tcontext=system_u:system_r:rpcd_t:s0 tclass=capability permissive=0


Hash: sm-notify,rpcd_t,rpcd_t,capability,dac_read_search
Comment 3 Micah Abbott 2017-08-16 15:10:44 EDT
This appears to be fixed in Rawhide Atomic Host with 'selinux-policy-3.13.1-270.fc27.noarch'

# rpm-ostree status
State: idle
Deployments:
● rawhide:fedora/rawhide/x86_64/atomic-host
                   Version: Rawhide.20170815.n.1 (2017-08-15 20:34:47)
                    Commit: a5b8ef53e3e93ed057c65e0d2b0ddea7f392862e77b930595dca9c7811abbd78

# rpm -q selinux-policy
selinux-policy-3.13.1-270.fc27.noarch

# grep 'avc: denied' /var/log/audit/audit.log 
#

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