Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1358526

Summary: SELinux is preventing systemd-modules from 'read' accesses on the file /etc/modprobe.d/lockd.conf.
Product: [Fedora] Fedora Reporter: Andre Costa <andre.ocosta>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 24CC: acc-bugz-redhat, chinwen_lin, christoph.maser, dominick.grift, dwalsh, e.misiek, javiermontano684, lvrabec, makruiten, mgrepl, plautrba, vaskodd
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:df4df9412cd3275c92e6f7927d037b36c431db4679ef80f8edb0d7112c55545b;VARIANT_ID=workstation;
Fixed In Version: selinux-policy-3.13.1-191.10.fc24 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-12 19:29:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Andre Costa 2016-07-20 22:20:45 UTC
Description of problem:
I tried to restart systemd-modules-load.service
SELinux is preventing systemd-modules from 'read' accesses on the file /etc/modprobe.d/lockd.conf.

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

If you believe that systemd-modules should be allowed read access on the lockd.conf file 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_conf_t:s0
Target Objects                /etc/modprobe.d/lockd.conf [ file ]
Source                        systemd-modules
Source Path                   systemd-modules
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           nfs-utils-1.3.3-8.rc5.fc24.x86_64
Policy RPM                    selinux-policy-3.13.1-191.5.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.6.3-300.fc24.x86_64 #1 SMP Fri
                              Jun 24 20:52:41 UTC 2016 x86_64 x86_64
Alert Count                   2
First Seen                    2016-07-20 19:15:57 BRT
Last Seen                     2016-07-20 19:15:57 BRT
Local ID                      3747e00b-04ad-4dc4-a378-9c4d8e21d475

Raw Audit Messages
type=AVC msg=audit(1469052957.223:335): avc:  denied  { read } for  pid=18894 comm="systemd-modules" name="lockd.conf" dev="dm-0" ino=1178822 scontext=system_u:system_r:systemd_modules_load_t:s0 tcontext=system_u:object_r:modules_conf_t:s0 tclass=file permissive=0


Hash: systemd-modules,systemd_modules_load_t,modules_conf_t,file,read

Version-Release number of selected component:
selinux-policy-3.13.1-191.5.fc24.noarch

Additional info:
reporter:       libreport-2.7.1
hashmarkername: setroubleshoot
kernel:         4.6.3-300.fc24.x86_64
reproducible:   Not sure how to reproduce the problem
type:           libreport

Comment 1 Martijn Kruiten 2016-07-27 09:51:18 UTC
Not sure if this is considered helpful or not, but I can confirm this bug. It was triggered during dnf update.

================================================================================
 Package              Arch     Version           Repository                Size
================================================================================
Upgrading:
 VirtualBox           x86_64   5.0.26-1.fc24     rpmfusion-free-updates    24 M
 VirtualBox-kmodsrc   x86_64   5.0.26-1.fc24     rpmfusion-free-updates   763 k
 akmod-VirtualBox     x86_64   5.0.26-1.fc24     rpmfusion-free-updates    26 k
 ffmpeg               x86_64   3.0.2-4.fc24      rpmfusion-free-updates   1.4 M
 ffmpeg-libs          x86_64   3.0.2-4.fc24      rpmfusion-free-updates   5.8 M
 libavdevice          x86_64   3.0.2-4.fc24      rpmfusion-free-updates    88 k

Error:

SELinux is preventing systemd-modules from read access on the file /etc/modprobe.d/lockd.conf.

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

If you believe that systemd-modules should be allowed read access on the lockd.conf file 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_conf_t:s0
Target Objects                /etc/modprobe.d/lockd.conf [ file ]
Source                        systemd-modules
Source Path                   systemd-modules
Port                          <Unknown>
Host                          <Removed>
Source RPM Packages           
Target RPM Packages           nfs-utils-1.3.3-8.rc5.fc24.x86_64
Policy RPM                    selinux-policy-3.13.1-191.5.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     <Removed>
Platform                      Linux <Removed> 4.6.4-301.fc24.x86_64 #1
                              SMP Tue Jul 12 11:50:00 UTC 2016 x86_64 x86_64
Alert Count                   2
First Seen                    2016-07-27 11:40:59 CEST
Last Seen                     2016-07-27 11:40:59 CEST
Local ID                      366941a4-e7ce-4436-8a53-f7e06e72b90e

Raw Audit Messages
type=AVC msg=audit(1469612459.729:698): avc:  denied  { read } for  pid=21375 comm="systemd-modules" name="lockd.conf" dev="dm-1" ino=1836486 scontext=system_u:system_r:systemd_modules_load_t:s0 tcontext=system_u:object_r:modules_conf_t:s0 tclass=file permissive=0


Hash: systemd-modules,systemd_modules_load_t,modules_conf_t,file,read

Comment 2 tuxor 2016-07-29 09:41:35 UTC
Description of problem:
The warning is produced on every boot and lets startup of systemd-modules-load.service fail.

Probably related to Bug 1360157 ?

Version-Release number of selected component:
selinux-policy-3.13.1-191.5.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.4-301.fc24.x86_64
type:           libreport

Comment 3 Vasil Draganov 2016-07-29 17:07:25 UTC
Description of problem:
The problem appeared after installing VirtualBox x86_64 5.0.26 1.fc24.

Version-Release number of selected component:
selinux-policy-3.13.1-191.5.fc24.noarch

Additional info:
reporter:       libreport-2.7.2
hashmarkername: setroubleshoot
kernel:         4.6.4-301.fc24.x86_64
type:           libreport

Comment 4 Fedora Update System 2016-08-10 12:24:38 UTC
selinux-policy-3.13.1-191.10.fc24 has been pushed to the Fedora 24 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-2016-2c8a3e08c6

Comment 5 Fedora Update System 2016-08-12 19:28:31 UTC
selinux-policy-3.13.1-191.10.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.