Bug 1293364 - SELinux is preventing adapter.rb:299 from 'module_request' accesses on the system Unknown.
SELinux is preventing adapter.rb:299 from 'module_request' accesses on the sy...
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: docker (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lokesh Mandvekar
Fedora Extras Quality Assurance
abrt_hash:e46ab321bc90e8a2147f4682089...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-21 09:53 EST by Yajo
Modified: 2016-02-22 14:05 EST (History)
14 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-02-22 14:05:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yajo 2015-12-21 09:53:53 EST
Description of problem:
Same as these:
- https://bugzilla.redhat.com/show_bug.cgi?id=1282781
- https://bugzilla.redhat.com/show_bug.cgi?id=1290379
- https://bugzilla.redhat.com/show_bug.cgi?id=1293257
- https://bugzilla.redhat.com/show_bug.cgi?id=1293259

But this one only happens in a different computer.
SELinux is preventing adapter.rb:299 from 'module_request' accesses on the system Unknown.

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

If quiere allow domain to kernel load modules
Then debe informar a SELinux de ésto activando el booleano 'domain_kernel_load_modules'.
Puede leer la página de manual 'None' para más detalles.
Do
setsebool -P domain_kernel_load_modules 1

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

If cree que de manera predeterminada, adapter.rb:299 debería permitir acceso module_request sobre  Unknown system.     
Then debería reportar esto como un error.
Puede generar un módulo de política local para permitir este acceso.
Do
permita el acceso momentáneamente executando:
# grep adapter.rb:299 /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:svirt_lxc_net_t:s0:c302,c705
Target Context                system_u:system_r:kernel_t:s0
Target Objects                Unknown [ system ]
Source                        adapter.rb:299
Source Path                   adapter.rb:299
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-157.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.2.7-300.fc23.x86_64 #1 SMP Wed
                              Dec 9 22:28:30 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-12-21 15:49:58 CET
Last Seen                     2015-12-21 15:49:58 CET
Local ID                      445e5509-43ef-4620-b623-99970f284cb9

Raw Audit Messages
type=AVC msg=audit(1450709398.868:752): avc:  denied  { module_request } for  pid=10681 comm="adapter.rb:299" kmod="snd-seq-client-14" scontext=system_u:system_r:svirt_lxc_net_t:s0:c302,c705 tcontext=system_u:system_r:kernel_t:s0 tclass=system permissive=0


Hash: adapter.rb:299,svirt_lxc_net_t,kernel_t,system,module_request

Version-Release number of selected component:
selinux-policy-3.13.1-157.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.2.7-300.fc23.x86_64
type:           libreport
Comment 1 Daniel Walsh 2015-12-21 10:12:43 EST
This means that the container process is triggering the kernel to load a kernel module.

I would prefer that the kernel module was loaded outside of the container, so the user/admin could decide if this is a kernel module that he wants loaded.
Comment 2 Yajo 2015-12-22 06:53:13 EST
And how can I do that?
Comment 3 Daniel Walsh 2015-12-22 09:50:31 EST
Perhaps you could add

ExecStartPre=/sbin/modprobe snd-seq-client-14 

to your systemd unit file that you are launching the container from, or if you are not launching the container from a unit file, create a unit like this that gets executed at boot.

```
[Unit]
Description=Kernel Module supporting snd-seq-client-14 
DefaultDependencies=no
Before=docker.service
Wants=docker.service

[Service]
Type=oneshot
ExecStart=/sbin/modprobe -q snd-seq-client-14
```

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