Bug 1568567

Summary: SELinux is preventing sssd_kcm from 'read' accesses on the Datei /dev/null.
Product: [Fedora] Fedora Reporter: marcel
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dwalsh, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:b8f549eba51a12255707145aae2f1a424bb854db7547186298aa2e3c755961ba;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-18 15:56:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description marcel 2018-04-17 19:05:06 UTC
Description of problem:
happened while using debootstrap
SELinux is preventing sssd_kcm from 'read' accesses on the Datei /dev/null.

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

If you believe that sssd_kcm should be allowed read access on the null file by default.
Then sie sollten dies als Fehler melden.
Um diesen Zugriff zu erlauben, k├Ânnen Sie ein lokales Richtlinien-Modul erstellen.
Do
allow this access for now by executing:
# ausearch -c 'sssd_kcm' --raw | audit2allow -M my-sssdkcm
# semodule -X 300 -i my-sssdkcm.pp

Additional Information:
Source Context                system_u:system_r:sssd_t:s0
Target Context                unconfined_u:object_r:device_t:s0
Target Objects                /dev/null [ file ]
Source                        sssd_kcm
Source Path                   sssd_kcm
Port                          <Unbekannt>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.30.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.15.16-300.fc27.x86_64 #1 SMP Mon
                              Apr 9 17:50:06 UTC 2018 x86_64
Alert Count                   2
First Seen                    2018-04-17 21:03:12 CEST
Last Seen                     2018-04-17 21:03:12 CEST
Local ID                      99eacc63-4023-4b04-874c-5ca2b55235d0

Raw Audit Messages
type=AVC msg=audit(1523991792.319:394): avc:  denied  { read } for  pid=28355 comm="sssd_secrets" path="/dev/null" dev="devtmpfs" ino=197980 scontext=system_u:system_r:sssd_t:s0 tcontext=unconfined_u:object_r:device_t:s0 tclass=file permissive=0


Hash: sssd_kcm,sssd_t,device_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-283.30.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.15.16-300.fc27.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2018-04-18 15:56:46 UTC
Hi, 

Please run:
# restorecon -Rv /

To fix mislabeled system.