Bug 1777446

Summary: SELinux is preventing systemd from using the 'setsched' accesses on a process.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: systemdAssignee: systemd-maint
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: dwalsh, lnykryn, lvrabec, mgrepl, msekleta, plautrba, ssahani, s, systemd-maint, zbyszek, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:c9b5ed9b8efa3b0b12ee5d9459fe0c26231dbf4b7fd8a7ba7114164b285aed7c;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-21 16:19:26 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:
Attachments:
Description Flags
# ausearch -m AVC,USER_AVC none

Description Mikhail 2019-11-27 15:32:02 UTC
Description of problem:
SELinux is preventing systemd from using the 'setsched' accesses on a process.

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

If you believe that systemd should be allowed setsched access on processes labeled rngd_t 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 'systemd' --raw | audit2allow -M my-systemd
# semodule -X 300 -i my-systemd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:system_r:rngd_t:s0
Target Objects                Unknown [ process ]
Source                        systemd
Source Path                   systemd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.5-16.fc32.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.4.0-2.fc32.x86_64 #1 SMP Mon Nov
                              25 22:45:19 UTC 2019 x86_64 x86_64
Alert Count                   2
First Seen                    2019-11-27 08:34:35 +05
Last Seen                     2019-11-27 08:40:33 +05
Local ID                      69ec6367-cba6-45d2-8a81-7bad7ac33b8c

Raw Audit Messages
type=AVC msg=audit(1574826033.954:487): avc:  denied  { setsched } for  pid=1 comm="systemd" scontext=system_u:system_r:init_t:s0 tcontext=system_u:system_r:rngd_t:s0 tclass=process permissive=1


Hash: systemd,init_t,rngd_t,process,setsched

Version-Release number of selected component:
selinux-policy-3.14.5-16.fc32.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.11.3
hashmarkername: setroubleshoot
kernel:         5.4.0-2.fc32.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-11-27 18:48:51 UTC
Hi  Mikhail, 

You created today ~50 bugzillas with same title and almost same problem. Let's try to solve it in one ticket. 

Could you please attach output of:

# ausearch -m AVC,USER_AVC

Thanks,
Lukas.

Comment 2 Mikhail 2019-11-27 18:54:44 UTC
Created attachment 1640218 [details]
# ausearch -m AVC,USER_AVC

Comment 3 Lukas Vrabec 2019-11-27 19:05:08 UTC
Hi Systemd folks, 

Is there something new in systemd rawhide version related to modifying schedule information of another processes? 

Thanks,
Lukas.

Comment 4 Zbigniew Jędrzejewski-Szmek 2019-12-21 16:19:26 UTC

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