Bug 1369286 - SELinux is preventing conftest from 'module_request' accesses on the system Unknown.
Summary: SELinux is preventing conftest from 'module_request' accesses on the system U...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:dac971f3cf35c6d59e6fb83e3cd...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-23 02:17 UTC by M. Edward (Ed) Borasky
Modified: 2016-08-23 10:31 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-23 10:31:57 UTC
Type: ---


Attachments (Terms of Use)
File: Dockerfile (2.65 KB, text/plain)
2016-08-23 02:17 UTC, M. Edward (Ed) Borasky
no flags Details

Description M. Edward (Ed) Borasky 2016-08-23 02:17:14 UTC
Description of problem:
Building a Docker image on a Fedora host 
SELinux is preventing conftest from 'module_request' accesses on the system Unknown.

*****  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.
You can read 'None' man page for more details.
Do
setsebool -P domain_kernel_load_modules 1

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

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

Additional Information:
Source Context                system_u:system_r:svirt_lxc_net_t:s0:c379,c867
Target Context                system_u:system_r:kernel_t:s0
Target Objects                Unknown [ system ]
Source                        conftest
Source Path                   conftest
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.6.6-300.fc24.x86_64 #1 SMP Wed
                              Aug 10 21:07:35 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-08-22 19:13:33 PDT
Last Seen                     2016-08-22 19:13:33 PDT
Local ID                      d60efa0e-4673-4994-b4c2-db4e20a1e81c

Raw Audit Messages
type=AVC msg=audit(1471918413.599:318): avc:  denied  { module_request } for  pid=18536 comm="conftest" kmod="net-pf-30" scontext=system_u:system_r:svirt_lxc_net_t:s0:c379,c867 tcontext=system_u:system_r:kernel_t:s0 tclass=system permissive=0


Hash: conftest,svirt_lxc_net_t,kernel_t,system,module_request


Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.6-300.fc24.x86_64
type:           libreport

Comment 1 M. Edward (Ed) Borasky 2016-08-23 02:17:19 UTC
Created attachment 1193111 [details]
File: Dockerfile

Comment 2 Daniel Walsh 2016-08-23 10:31:57 UTC
I am not sure if we want to allow unprivileged containers to request that the kernel loads modules.

Looks like there is a boolean to allow the loading of modules by all domains, so I think you should set this, if you want this behaviour.

setsebool -P domain_kernel_load_modules 1

Or have the module loaded before running your contianer.


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