Bug 1474940 - SELinux is preventing systemd-tmpfile from using the 'dac_read_search' capabilities.
SELinux is preventing systemd-tmpfile from using the 'dac_read_search' capabi...
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:488cd3dfc396a6bc2d2885967a0...
:
Depends On: 1467468
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-25 12:16 EDT by Micah Abbott
Modified: 2017-08-16 15:09 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1467468
Environment:
Last Closed: 2017-08-16 15:09:59 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:16:07 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:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:02 micah-f26ah-vm0725a.localdomain audit[647]: AVC avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0
Jul 25 16:07:03 micah-f26ah-vm0725a.localdomain kernel: audit: type=1400 audit(1500998822.702:75): avc:  denied  { dac_read_search } for  pid=647 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0




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

Description of problem:
SELinux is preventing systemd-tmpfile 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 systemd-tmpfile 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 'systemd-tmpfile' --raw | audit2allow -M my-systemdtmpfile
# semodule -X 300 -i my-systemdtmpfile.pp

Additional Information:
Source Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Context                system_u:system_r:systemd_tmpfiles_t:s0
Target Objects                Unknown [ capability ]
Source                        systemd-tmpfile
Source Path                   systemd-tmpfile
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                   731
First Seen                    2017-05-21 20:26:54 MDT
Last Seen                     2017-07-03 15:51:59 MDT
Local ID                      1dad7e22-afc2-4464-a3bc-d49ef9e4f7ef

Raw Audit Messages
type=AVC msg=audit(1499118719.51:257): avc:  denied  { dac_read_search } for  pid=3756 comm="systemd-tmpfile" capability=2  scontext=system_u:system_r:systemd_tmpfiles_t:s0 tcontext=system_u:system_r:systemd_tmpfiles_t:s0 tclass=capability permissive=0


Hash: systemd-tmpfile,systemd_tmpfiles_t,systemd_tmpfiles_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 1451385

--- Additional comment from Daniel Walsh on 2017-07-06 07:35:11 EDT ---

I think a lot of these are caused by some fixes to the kernel that now does dac_read_search before dac_override.  We could probable replace a lot of dac_override access with dac_read_search.
Comment 1 Jan Kurik 2017-08-15 04:55:00 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.
Comment 2 Micah Abbott 2017-08-16 15:09:59 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.