Bug 1318496 - SELinux is preventing unix_chkpwd from 'read' accesses on the file /etc/shadow.
Summary: SELinux is preventing unix_chkpwd from 'read' accesses on the file /etc/shadow.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:116d694de9ce6a51fa40654e781...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-17 05:02 UTC by Chen_Min_Chin
Modified: 2016-03-21 10:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-21 10:03:52 UTC
Type: ---


Attachments (Terms of Use)

Description Chen_Min_Chin 2016-03-17 05:02:43 UTC
Description of problem:
SELinux is preventing unix_chkpwd from 'read' accesses on the file /etc/shadow.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that unix_chkpwd should be allowed read access on the shadow file 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:
# grep unix_chkpwd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:shadow_t:s0
Target Objects                /etc/shadow [ file ]
Source                        unix_chkpwd
Source Path                   unix_chkpwd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           setup-2.10.1-1.fc23.noarch
Policy RPM                    selinux-policy-3.13.1-158.9.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.4.4-301.fc23.x86_64 #1 SMP Fri
                              Mar 4 17:42:42 UTC 2016 x86_64 x86_64
Alert Count                   2
First Seen                    2016-03-17 12:07:39 CST
Last Seen                     2016-03-17 12:07:39 CST
Local ID                      396210f8-f215-40e7-8f27-e004c1b30f8f

Raw Audit Messages
type=AVC msg=audit(1458187659.490:461): avc:  denied  { read } for  pid=6256 comm="unix_chkpwd" name="shadow" dev="dm-1" ino=1182133 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:shadow_t:s0 tclass=file permissive=0


Hash: unix_chkpwd,httpd_t,shadow_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-158.9.fc23.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.4.4-301.fc23.x86_64
type:           libreport

Comment 1 Daniel Walsh 2016-03-17 20:08:45 UTC
Allowing the apache process to read the /etc/shadow file seems like a bad idea.


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