Bug 1426906 - SELinux is preventing systemd-modules from 'module_load' accesses on the system /usr/lib/modules/4.9.11-200.fc25.x86_64/extra/VirtualBox/vboxdrv.ko.
Summary: SELinux is preventing systemd-modules from 'module_load' accesses on the syst...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 25
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:3d0cf96b87c027b36f7dce9cc05...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-26 09:26 UTC by steinach2810
Modified: 2017-12-12 10:08 UTC (History)
21 users (show)

Fixed In Version: selinux-policy-3.13.1-225.11.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-12 10:08:24 UTC


Attachments (Terms of Use)

Description steinach2810 2017-02-26 09:26:04 UTC
Description of problem:
SELinux is preventing systemd-modules from 'module_load' accesses on the system /usr/lib/modules/4.9.11-200.fc25.x86_64/extra/VirtualBox/vboxdrv.ko.

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

If you believe that systemd-modules should be allowed module_load access on the vboxdrv.ko 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 'systemd-modules' --raw | audit2allow -M my-systemdmodules
# semodule -X 300 -i my-systemdmodules.pp

Additional Information:
Source Context                system_u:system_r:systemd_modules_load_t:s0
Target Context                system_u:object_r:modules_object_t:s0
Target Objects                /usr/lib/modules/4.9.11-200.fc25.x86_64/extra/Virt
                              ualBox/vboxdrv.ko [ system ]
Source                        systemd-modules
Source Path                   systemd-modules
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           kmod-VirtualBox-4.9.11-200.fc25.x86_64-5.1.14-1.fc
                              25.x86_64
Policy RPM                    selinux-policy-3.13.1-225.10.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.9.11-200.fc25.x86_64 #1 SMP Mon
                              Feb 20 18:11:59 UTC 2017 x86_64 x86_64
Alert Count                   4
First Seen                    2017-02-26 11:23:39 EET
Last Seen                     2017-02-26 11:23:39 EET
Local ID                      7c4127e6-0477-4cd1-8177-ce807cffd67c

Raw Audit Messages
type=AVC msg=audit(1488101019.98:831): avc:  denied  { module_load } for  pid=6540 comm="systemd-modules" path="/usr/lib/modules/4.9.11-200.fc25.x86_64/extra/VirtualBox/vboxdrv.ko" dev="dm-0" ino=273199 scontext=system_u:system_r:systemd_modules_load_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=system permissive=0


Hash: systemd-modules,systemd_modules_load_t,modules_object_t,system,module_load

Version-Release number of selected component:
selinux-policy-3.13.1-225.10.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.11-200.fc25.x86_64
type:           libreport

Comment 1 Ed Greshko 2017-02-26 23:12:04 UTC
I believe this to be the same problem when vboxdrv.service is run.

[root@meimei system]# ausearch -c 'modprobe' --raw 
type=AVC msg=audit(1488120127.660:812): avc:  denied  { module_load } for  pid=19921 comm="modprobe" path="/usr/lib/modules/4.9.11-200.fc25.x86_64/misc/vboxdrv.ko" dev="sda2" ino=2508326 scontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tcontext=system_u:object_r:modules_object_t:s0 tclass=system permissive=0

selinux-policy-targeted-3.13.1-225.10.fc25.noarch
selinux-policy-3.13.1-225.10.fc25.noarch

as well.

Comment 2 Mamoru TASAKA 2017-02-27 04:04:32 UTC
-225.7.fc25 seems good, it seems that this related to change in -225.8:
http://pkgs.fedoraproject.org/cgit/rpms/selinux-policy.git/commit/?h=f25&id=868a63010db6e19dd2f26182c7c6b33f9ae8a429

Comment 3 Fedora Update System 2017-02-27 11:29:07 UTC
selinux-policy-3.13.1-225.11.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e06f91350b

Comment 4 Ed Greshko 2017-02-27 12:17:44 UTC
The updated policy packages fixed the problem for me.

Comment 5 Jerry Amundson 2017-02-27 12:41:57 UTC
Description of problem:
Installed new kernel

Version-Release number of selected component:
selinux-policy-3.13.1-225.10.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.11-200.fc25.x86_64
type:           libreport

Comment 6 valendi.r 2017-02-27 19:11:34 UTC
I have the same problem

SELinux is preventing systemd-modules from module_load access on the system /usr/lib/modules/4.9.11-200.fc25.x86_64/extra/VirtualBox/vboxdrv.ko.

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

If you believe that systemd-modules should be allowed module_load access on the vboxdrv.ko 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 'systemd-modules' --raw | audit2allow -M my-systemdmodules
# semodule -X 300 -i my-systemdmodules.pp

Additional Information:
Source Context                system_u:system_r:systemd_modules_load_t:s0
Target Context                system_u:object_r:modules_object_t:s0
Target Objects                /usr/lib/modules/4.9.11-200.fc25.x86_64/extra/Virt
                              ualBox/vboxdrv.ko [ system ]
Source                        systemd-modules
Source Path                   systemd-modules
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           
Target RPM Packages           kmod-VirtualBox-4.9.11-200.fc25.x86_64-5.1.14-1.fc
                              25.x86_64
Policy RPM                    selinux-policy-3.13.1-225.10.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain 4.9.11-200.fc25.x86_64
                              #1 SMP Mon Feb 20 18:11:59 UTC 2017 x86_64 x86_64
Alert Count                   8
First Seen                    2017-02-27 21:51:56 MSK
Last Seen                     2017-02-27 21:59:23 MSK
Local ID                      e8e66ff8-dff7-4d61-9560-12b882fe1e69

Raw Audit Messages
type=AVC msg=audit(1488221963.881:184): avc:  denied  { module_load } for  pid=6321 comm="systemd-modules" path="/usr/lib/modules/4.9.11-200.fc25.x86_64/extra/VirtualBox/vboxdrv.ko" dev="sda3" ino=267588 scontext=system_u:system_r:systemd_modules_load_t:s0 tcontext=system_u:object_r:modules_object_t:s0 tclass=system permissive=0


Hash: systemd-modules,systemd_modules_load_t,modules_object_t,system,module_load

selinux-policy-3.13.1-225.10.fc25.noarch

>journalctl -xb
фев 27 22:09:30 localhost.localdomain audit[6993]: AVC avc:  denied  { module_load } for  pid=6993 comm="systemd-
фев 27 22:09:30 localhost.localdomain audit[6993]: AVC avc:  denied  { module_load } for  pid=6993 comm="systemd-
фев 27 22:09:30 localhost.localdomain audit[6993]: AVC avc:  denied  { module_load } for  pid=6993 comm="systemd-
фев 27 22:09:30 localhost.localdomain audit[6993]: AVC avc:  denied  { module_load } for  pid=6993 comm="systemd-
фев 27 22:09:30 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=sys
фев 27 22:09:30 localhost.localdomain systemd-modules-load[6993]: Failed to insert 'vboxdrv': Permission denied
фев 27 22:09:30 localhost.localdomain systemd-modules-load[6993]: Failed to insert 'vboxnetflt': Permission denie
фев 27 22:09:30 localhost.localdomain systemd-modules-load[6993]: Failed to insert 'vboxnetadp': Permission denie
фев 27 22:09:30 localhost.localdomain systemd-modules-load[6993]: Failed to insert 'vboxpci': Permission denied
фев 27 22:09:30 localhost.localdomain systemd[1]: systemd-modules-load.service: Main process exited, code=exited,
фев 27 22:09:30 localhost.localdomain systemd[1]: Failed to start Load Kernel Modules.

Comment 7 valendi.r 2017-02-27 19:17:56 UTC
selinux-policy-3.13.1-225.11.fc25 has fixed the problem. Thanks!

Comment 8 Mukul Kantiwal 2017-02-27 22:33:24 UTC
Description of problem:
I updated my fedora machine. After update, as I intalled VirtualBox I received this error. 
I don't understand what has caused this error.

Version-Release number of selected component:
selinux-policy-3.13.1-225.10.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.11-200.fc25.x86_64
type:           libreport

Comment 9 Fedora Update System 2017-02-27 23:51:46 UTC
selinux-policy-3.13.1-225.11.fc25 has been pushed to the Fedora 25 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-2017-e06f91350b

Comment 10 Gurenko Alex 2017-02-28 05:58:02 UTC
(In reply to Fedora Update System from comment #9)
> selinux-policy-3.13.1-225.11.fc25 has been pushed to the Fedora 25 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-2017-e06f91350b

Was it pulled from the repo? Trying it now and there is no *-11.fc25 in testing.

Comment 11 Andre Robatino 2017-02-28 06:01:36 UTC
It's in testing and in the process of going to stable right now. You can download it manually from https://dl.fedoraproject.org/pub/fedora/linux/updates/testing/25/ until then.

Comment 12 Gurenko Alex 2017-02-28 06:11:47 UTC
(In reply to Andre Robatino from comment #11)
> It's in testing and in the process of going to stable right now. You can
> download it manually from
> https://dl.fedoraproject.org/pub/fedora/linux/updates/testing/25/ until then.

Thanks, yes, manual installation worked and optirun back to normal afterwards.

Comment 13 necromandos 2017-02-28 08:30:35 UTC
Description of problem:
Linux kernel was updated by the system and the problem occured right after when i tried to load a vm using vagrant with virtualbox provider

Version-Release number of selected component:
selinux-policy-3.13.1-225.10.fc25.noarch

Additional info:
reporter:       libreport-2.8.0
hashmarkername: setroubleshoot
kernel:         4.9.11-200.fc25.x86_64
type:           libreport

Comment 14 Fedora Update System 2017-02-28 08:49:39 UTC
selinux-policy-3.13.1-225.11.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 John Boero 2017-02-28 16:53:23 UTC
Thanks for the quick fix guys.  Uber helpful.

Comment 16 James Willcox 2017-04-10 19:00:36 UTC
I still have this problem even with the latest selinux-policy installed:

Apr 10 13:55:30 lulu systemd[1]: Starting Load Kernel Modules...
Apr 10 13:55:30 lulu audit[2730]: AVC avc:  denied  { module_load } for  pid=2730 comm="systemd-modules" scontext=system_u:system_r:systemd_modules_load_t:s0 tcontext=system_u
Apr 10 13:55:30 lulu systemd-modules-load[2730]: Failed to insert 'it87': Permission denied
Apr 10 13:55:30 lulu systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
Apr 10 13:55:30 lulu systemd[1]: Failed to start Load Kernel Modules.
Apr 10 13:55:30 lulu audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-modules-load comm="systemd" exe="/us
Apr 10 13:55:30 lulu systemd[1]: systemd-modules-load.service: Unit entered failed state.
Apr 10 13:55:30 lulu systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
Apr 10 13:55:30 lulu sudo[2727]: pam_unix(sudo:session): session closed for user root
Apr 10 13:55:30 lulu audit[2727]: USER_END pid=2727 uid=0 auid=1000 ses=4 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_key
Apr 10 13:55:30 lulu audit[2727]: CRED_DISP pid=2727 uid=0 auid=1000 ses=4 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_
Apr 10 13:55:32 lulu sudo[2741]:    snorp : TTY=pts/0 ; PWD=/home/snorp ; USER=root ; COMMAND=/bin/journalctl -xe
Apr 10 13:55:32 lulu audit[2741]: USER_CMD pid=2741 uid=1000 auid=1000 ses=4 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/snorp" cmd=6A6F75726E61
Apr 10 13:55:32 lulu audit[2741]: CRED_REFR pid=2741 uid=0 auid=1000 ses=4 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_env,pam_
Apr 10 13:55:32 lulu sudo[2741]: pam_systemd(sudo:session): Cannot create session: Already occupied by a session
Apr 10 13:55:32 lulu audit[2741]: USER_START pid=2741 uid=0 auid=1000 ses=4 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_ke
Apr 10 13:55:32 lulu sudo[2741]: pam_unix(sudo:session): session opened for user root by (uid=0)
Apr 10 13:55:35 lulu dbus-daemon[1061]: [system] Activating service name='org.fedoraproject.Setroubleshootd' requested by ':1.42' (uid=0 pid=1021 comm="/usr/sbin/sedispatch " 
Apr 10 13:55:36 lulu dbus-daemon[1061]: [system] Successfully activated service 'org.fedoraproject.Setroubleshootd'
Apr 10 13:55:36 lulu setroubleshoot[2750]: SELinux is preventing systemd-modules from module_load access on the system Unknown. For complete SELinux messages. run sealert -l 4
Apr 10 13:55:36 lulu python3[2750]: SELinux is preventing systemd-modules from module_load access on the system Unknown.
                                    
                                    *****  Plugin catchall (100. confidence) suggests   **************************
                                    
                                    If you believe that systemd-modules should be allowed module_load 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 'systemd-modules' --raw | audit2allow -M my-systemdmodules
                                    # semodule -X 300 -i my-systemdmodules.pp

Comment 17 Fedora End Of Life 2017-11-16 18:37:08 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 18 Fedora End Of Life 2017-12-12 10:08:24 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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