Bug 1697886 - Denials of rngd running execmem while loading shared libraries during startup in F30
Summary: Denials of rngd running execmem while loading shared libraries during startup...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 30
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-04-09 08:54 UTC by Matt Fagnani
Modified: 2020-01-31 01:12 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-3.14.3-55.fc30
Clone Of:
Environment:
Last Closed: 2020-01-31 01:12:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Matt Fagnani 2019-04-09 08:54:39 UTC
Description of problem:

I've seen denials of rngd running execmem several times when booting in F30. The denials started right after I ran dnf system-upgrade from F29. The audit messages are of the form.

type=AVC msg=audit(1554728843.716:120): avc:  denied  { execmem } for  pid=879 comm="rngd" scontext=system_u:system_r:rngd_t:s0 tcontext=system_u:system_r:rngd_t:s0 tclass=process permissive=0

The journal showed that rngd had an error loading shared libraries and stopped unexpectedly due to the denials.

audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=rngd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
audit[879]: AVC avc:  denied  { execmem } for  pid=879 comm="rngd" scontext=system_u:system_r:rngd_t:s0 tcontext=system_u:system_r:rngd_t:s0 tclass=process permissive=0
rngd[879]: /sbin/rngd: error while loading shared libraries: cannot make segment writable for relocation: Permission denied
audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=rngd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
systemd[1]: rngd.service: Main process exited, code=exited, status=127/n/a
systemd[1]: rngd.service: Failed with result 'exit-code'.

rngd doesn't appear to restart itself. I'm running the targeted policy 3.14.3-27 in enforcing mode.

Version-Release number of selected component (if applicable):
rng-tools-0:6.7-1.fc30.i686
selinux-policy-0:3.14.3-27.fc30.noarch

How reproducible:
The denials happened 7 times which is most if not all of the times I've booted in F30.

Steps to Reproduce:
1. Boot in F30 with the rngd service enabled
2. sudo ausearch -m AVC,USER_AVC,SELINUX_ERR -ts today
3. journalctl --since today -g rngd
4. systemctl status rngd

Actual results:
rngd was denied the action execmem while loading shared libraries and exited several times during startup in F30.

Expected results:
No denials occur and rngd starts normally.

Additional info:

Comment 1 Lukas Vrabec 2020-01-10 13:45:49 UTC
commit 3b51277ea03d4df62f01f8082c8e5d0ee34a9379 (HEAD -> rawhide, origin/rawhide, origin/HEAD)
Author: Nikola Knazekova <nknazeko>
Date:   Fri Jan 10 13:49:52 2020 +0100

    Boolean: rngd_t to use executable memory
    
    New boolean for rngd_t,daemon that feeds random data from hardware device to kernel, to execute memory.
    
    Fixed bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1697886

Comment 2 Fedora Update System 2020-01-14 02:48:23 UTC
selinux-policy-3.14.3-55.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-384545235e

Comment 3 Fedora Admin XMLRPC Client 2020-01-23 16:24:55 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.

Comment 4 Fedora Update System 2020-01-31 01:12:18 UTC
selinux-policy-3.14.3-55.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


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