Bug 1311264

Summary: SELinux is preventing /usr/sbin/rngd from execmod access on the file /usr/sbin/rngd
Product: [Fedora] Fedora Reporter: cornel panceac <cpanceac>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 23CC: cpanceac, dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-20 18:58:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
journal log none

Description cornel panceac 2016-02-23 18:29:46 UTC
Created attachment 1129880 [details]
journal log

Description of problem:
as the title say, rngd.service works if i setenforce 0, but not by default (setenforce 1).

See attachment for some more details. It was collected after setenforce 0 but is still relevant, in my opinion. 
Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1.boot system
2.systemctl | grep fail
3.

Actual results:
rngd is failed

Expected results:
rngd is active

Additional info:

Also, if this happens at boot, no alert in notification panel. if it happens after log into gnome shell, there is one alert but clicking on it just makes it dissapear.

Comment 1 cornel panceac 2016-02-23 18:55:34 UTC
Maybe this is also interesting:

# systemctl status rngd
● rngd.service - Hardware RNG Entropy Gatherer Daemon
   Loaded: loaded (/usr/lib/systemd/system/rngd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2016-02-23 20:11:50 EET; 42min ago
 Main PID: 3806 (rngd)
   CGroup: /system.slice/rngd.service
           └─3806 /sbin/rngd -f

Feb 23 20:11:50 james.last systemd[1]: Started Hardware RNG Entropy Gatherer Daemon.
Feb 23 20:11:50 james.last systemd[1]: Starting Hardware RNG Entropy Gatherer Daemon...
Feb 23 20:11:50 james.last rngd[3806]: read error
Feb 23 20:11:50 james.last rngd[3806]: read error

Comment 2 Lukas Vrabec 2016-02-25 09:32:54 UTC
Hi, 

Please could you try following: 

$ cat myrngd.cil 
(typeattributeset cil_gen_require rngd_t)
(typeattributeset cil_gen_require rngd_exec_t)
(allow rngd_t rngd_exec_t (file (execmod)))

# semodule -i myrngd.cil


Then try to start rngd daemon. 


Thank you!

Comment 3 cornel panceac 2016-02-25 20:20:12 UTC
I've already followed the instructions from the error log to allow rngd to start. Is it still helpful to follow your previous instructions?

Comment 4 Lukas Vrabec 2016-02-26 11:32:20 UTC
And everything working right?

Comment 5 cornel panceac 2016-02-26 12:51:56 UTC
\Well, service starts, but gives two read errors.

Comment 6 Lukas Vrabec 2016-02-26 13:37:35 UTC
Could you do following scenario? 

1. start service using systemctl
2. #ausearch -m AVC -ts recent 
3. attach this outuput.


Thank you!

Comment 7 cornel panceac 2016-02-26 21:25:06 UTC
To clarify, this is the service status now:

# systemctl status rngd.service
● rngd.service - Hardware RNG Entropy Gatherer Daemon
   Loaded: loaded (/usr/lib/systemd/system/rngd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2016-02-26 23:02:10 EET; 20min ago
 Main PID: 820 (rngd)
   CGroup: /system.slice/rngd.service
           └─820 /sbin/rngd -f

Feb 26 23:02:10 james.last systemd[1]: Started Hardware RNG Entropy Gatherer Daemon.
Feb 26 23:02:10 james.last systemd[1]: Starting Hardware RNG Entropy Gatherer Daemon...
Feb 26 23:02:10 james.last rngd[820]: read error
Feb 26 23:02:10 james.last rngd[820]: read error


This is the requested output:
# ausearch -m AVC -ts recent
<no matches>

Comment 8 Fedora End Of Life 2016-11-24 15:43:46 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Fedora End Of Life 2016-12-20 18:58:29 UTC
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.