Bug 1459413 - SELinux is preventing grubby from 'read' accesses on the blk_file sr0.
Summary: SELinux is preventing grubby from 'read' accesses on the blk_file sr0.
Keywords:
Status: CLOSED ERRATA
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:210b8e0a9669eeb39f0dd08cdf9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-07 05:02 UTC by vikram goyal
Modified: 2017-06-14 07:22 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-3.13.1-225.18.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-14 07:22:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description vikram goyal 2017-06-07 05:02:14 UTC
Description of problem:
I was getting the following errors.
Jun 06 10:06:13 ganak. kdumpctl[981]: No memory reserved for crash kernel.
Jun 06 10:06:13 ganak. kdumpctl[981]: Starting kdump: [FAILED]

To solve it I executed system-config-kdump
Which opened a gui where initially "Firmware assisted dump" was selected by default. It automatically selected "Manual Settings"
& filled "New kdump Memory" to 128(MB) while "Current kdump Memory" remained 0 (MB)

At this point the 3 selinux alerts happened.

type=AVC msg=audit(1496811012.375:1681): avc:  denied  { read } for  pid=10088 comm="grubby" name="sr0" dev="devtmpfs" ino=11675 scontext=system_u:system_r:kdumpgui_t:s0-s0:c0.c1023 tcontext=system_u:object_r:removable_device_t:s0 tclass=blk_file permissive=0
type=AVC msg=audit(1496811013.149:1682): avc:  denied  { write } for  pid=10088 comm="grubby" name="/" dev="tmpfs" ino=11695 scontext=system_u:system_r:kdumpgui_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_run_t:s0 tclass=dir permissive=0
type=AVC msg=audit(1496811013.149:1683): avc:  denied  { write } for  pid=10088 comm="grubby" name="log" dev="sda3" ino=617 scontext=system_u:system_r:kdumpgui_t:s0-s0:c0.c1023 tcontext=system_u:object_r:var_log_t:s0 tclass=dir permissive=0
SELinux is preventing grubby from 'read' accesses on the blk_file sr0.

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

If you believe that grubby should be allowed read access on the sr0 blk_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 'grubby' --raw | audit2allow -M my-grubby
# semodule -X 300 -i my-grubby.pp

Additional Information:
Source Context                system_u:system_r:kdumpgui_t:s0-s0:c0.c1023
Target Context                system_u:object_r:removable_device_t:s0
Target Objects                sr0 [ blk_file ]
Source                        grubby
Source Path                   grubby
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-225.16.fc25.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.3-200.fc25.x86_64 #1 SMP Thu
                              May 25 19:03:07 UTC 2017 x86_64 x86_64
Alert Count                   2
First Seen                    2017-06-07 10:20:12 IST
Last Seen                     2017-06-07 10:20:17 IST
Local ID                      7befdb7d-890d-41b8-8655-ee61ae0b608b

Raw Audit Messages
type=AVC msg=audit(1496811017.505:1684): avc:  denied  { read } for  pid=10087 comm="system-config-k" name="sr0" dev="devtmpfs" ino=11675 scontext=system_u:system_r:kdumpgui_t:s0-s0:c0.c1023 tcontext=system_u:object_r:removable_device_t:s0 tclass=blk_file permissive=0


Hash: grubby,kdumpgui_t,removable_device_t,blk_file,read

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

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

Potential duplicate: bug 1026644

Comment 1 Fedora Update System 2017-06-08 11:28:42 UTC
selinux-policy-3.13.1-225.18.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-45ca9bfcb6

Comment 2 Fedora Update System 2017-06-09 13:39:43 UTC
selinux-policy-3.13.1-225.18.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-45ca9bfcb6

Comment 3 Fedora Update System 2017-06-14 07:22:23 UTC
selinux-policy-3.13.1-225.18.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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