Bug 1464770 - SELinux is preventing sshd from using the 'dac_read_search' capabilities.
Summary: SELinux is preventing sshd from using the 'dac_read_search' capabilities.
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:d1b1ac25d8c5865ea3d96557c9e...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-25 15:12 UTC by Dale Turner
Modified: 2017-08-16 19:09 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-08-16 19:09:08 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dale Turner 2017-06-25 15:12:09 UTC
Description of problem:
SELinux is preventing sshd 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 sshd 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 'sshd' --raw | audit2allow -M my-sshd
# semodule -X 300 -i my-sshd.pp

Additional Information:
Source Context                system_u:system_r:sshd_t:s0-s0:c0.c1023
Target Context                system_u:system_r:sshd_t:s0-s0:c0.c1023
Target Objects                Unknown [ capability ]
Source                        sshd
Source Path                   sshd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.12.0-0.rc6.git3.2.fc27.x86_64 #1
                              SMP Thu Jun 22 23:40:46 UTC 2017 x86_64 x86_64
Alert Count                   12
First Seen                    2017-05-14 01:16:31 ADT
Last Seen                     2017-06-25 11:20:25 ADT
Local ID                      90f701c8-6613-43fa-b3de-da843a60dfad

Raw Audit Messages
type=AVC msg=audit(1498400425.410:74644): avc:  denied  { dac_read_search } for  pid=10525 comm="sshd" capability=2  scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tclass=capability permissive=0


Hash: sshd,sshd_t,sshd_t,capability,dac_read_search


Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.12.0-0.rc6.git3.2.fc27.x86_64
type:           libreport

Comment 1 Micah Abbott 2017-07-25 16:25:07 UTC
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:36 micah-f26ah-vm0725a.localdomain audit[1084]: AVC avc:  denied  { dac_read_search } for  pid=1084 comm="sshd" capability=2  scontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tcontext=system_u:system_r:sshd_t:s0-s0:c0.c1023 tclass=capability permissive=0

Comment 2 Jan Kurik 2017-08-15 08:54:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 3 Micah Abbott 2017-08-16 19:09:08 UTC
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.