Bug 1624552

Summary: SELinux is preventing dhclient from 'getattr' accesses on the chr_file /dev/random.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, lslebodn, lvrabec, mgrepl, plautrba, pmoore
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:328a85eadbbd851bef6c7f34e96cf7b5a51f35e5b5bda86ffb50717c28bfab20;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-06 18:46:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mikhail 2018-09-01 10:49:21 UTC
Description of problem:
SELinux is preventing dhclient from 'getattr' accesses on the chr_file /dev/random.

*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************

If you want to allow authlogin to nsswitch use ldap
Then you must tell SELinux about this by enabling the 'authlogin_nsswitch_use_ldap' boolean.

Do
setsebool -P authlogin_nsswitch_use_ldap 1

*****  Plugin catchall (11.6 confidence) suggests   **************************

If you believe that dhclient should be allowed getattr access on the random chr_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:
# ausearch -c 'dhclient' --raw | audit2allow -M my-dhclient
# semodule -X 300 -i my-dhclient.pp

Additional Information:
Source Context                system_u:system_r:dhcpc_t:s0
Target Context                system_u:object_r:random_device_t:s0
Target Objects                /dev/random [ chr_file ]
Source                        dhclient
Source Path                   dhclient
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.2-32.fc29.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.19.0-0.rc1.git0.1.fc30.x86_64 #1
                              SMP Mon Aug 27 13:01:19 UTC 2018 x86_64 x86_64
Alert Count                   3
First Seen                    2018-08-29 00:29:50 +05
Last Seen                     2018-09-01 13:03:05 +05
Local ID                      65ae0094-de4c-40ad-af57-c24f00b3f1e2

Raw Audit Messages
type=AVC msg=audit(1535788985.624:648): avc:  denied  { getattr } for  pid=2233 comm="dhclient" path="/dev/random" dev="devtmpfs" ino=1032 scontext=system_u:system_r:dhcpc_t:s0 tcontext=system_u:object_r:random_device_t:s0 tclass=chr_file permissive=1


Hash: dhclient,dhcpc_t,random_device_t,chr_file,getattr

Version-Release number of selected component:
selinux-policy-3.14.2-32.fc29.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.19.0-0.rc1.git4.1.fc30.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2018-09-01 17:17:19 UTC
*** Bug 1624553 has been marked as a duplicate of this bug. ***

Comment 2 Lukas Slebodnik 2018-09-06 18:46:01 UTC
I would say it is a duplicate of openssl bug.

Please reopen if you can reproduce even with the latest openssl

*** This bug has been marked as a duplicate of bug 1624554 ***