Bug 2227541

Summary: SELinux is preventing waydroid from 'module_request' accesses on the system labeled kernel_t.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: waydroidAssignee: Alessandro Astone <ales.astone>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: ales.astone, dwalsh, lvrabec, mikhail.v.gavrilov, mmalik, nknazeko, omosnacek, pkoncity, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:a824974a964092a4713b345edb41d63f72283a7730379e7bc77be6cafc6e6d31;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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
File: description
none
File: os_info none

Description Mikhail 2023-07-30 15:41:19 UTC
Description of problem:
Happens when I start Waydroid
SELinux is preventing waydroid from 'module_request' accesses on the system labeled kernel_t.

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

If you want to allow domain to kernel load modules
Then you must tell SELinux about this by enabling the 'domain_kernel_load_modules' boolean.

Do
setsebool -P domain_kernel_load_modules 1

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

If you believe that waydroid should be allowed module_request access on system labeled kernel_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 'waydroid' --raw | audit2allow -M my-waydroid
# semodule -X 300 -i my-waydroid.pp

Additional Information:
Source Context                system_u:system_r:waydroid_t:s0
Target Context                system_u:system_r:kernel_t:s0
Target Objects                Unknown [ system ]
Source                        waydroid
Source Path                   waydroid
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-38.22-1.fc39.noarch
Local Policy RPM              
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 6.5.0-
                              0.rc3.20230728git57012c57536f.27.fc39.x86_64+debug
                              #1 SMP PREEMPT_DYNAMIC Fri Jul 28 19:18:00 +05
                              2023 x86_64
Alert Count                   1
First Seen                    2023-07-30 20:40:47 +05
Last Seen                     2023-07-30 20:40:47 +05
Local ID                      48db03a0-486f-4362-a6fa-f871100a6b21

Raw Audit Messages
type=AVC msg=audit(1690731647.60:1446): avc:  denied  { module_request } for  pid=499731 comm="waydroid" kmod="tcp-ulp-tls" scontext=system_u:system_r:waydroid_t:s0 tcontext=system_u:system_r:kernel_t:s0 tclass=system permissive=1


Hash: waydroid,waydroid_t,kernel_t,system,module_request

Version-Release number of selected component:
selinux-policy-targeted-38.22-1.fc39.noarch

Additional info:
reporter:       libreport-2.17.11
reason:         SELinux is preventing waydroid from 'module_request' accesses on the system labeled kernel_t.
package:        selinux-policy-targeted-38.22-1.fc39.noarch
component:      selinux-policy
hashmarkername: setroubleshoot
type:           libreport
kernel:         6.5.0-0.rc3.20230728git57012c57536f.27.fc39.x86_64+debug
comment:        Happens when I start Waydroid
component:      selinux-policy

Comment 1 Mikhail 2023-07-30 15:41:22 UTC
Created attachment 1980721 [details]
File: description

Comment 2 Mikhail 2023-07-30 15:41:23 UTC
Created attachment 1980722 [details]
File: os_info

Comment 3 Fedora Release Engineering 2023-08-16 08:06:09 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.