Bug 1693878 - SELinux is preventing hdparm from 'open' accesses on the blk_file /dev/nvme0n1.
Summary: SELinux is preventing hdparm from 'open' accesses on the blk_file /dev/nvme0n1.
Keywords:
Status: CLOSED DUPLICATE of bug 1692154
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 29
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:722f950614eb9ff6affb401258f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-28 20:53 UTC by Matt Parkinson
Modified: 2019-03-29 06:40 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-03-29 06:40:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Matt Parkinson 2019-03-28 20:53:33 UTC
Description of problem:
This alert appears every morning when I dock my "sleeping" ThinkPad 470s. I have followed the recommended steps to generate/apply the SELinux module a few times now and it has not solved the problem. As far as I can tell there is no impact other than the alert being generated.
SELinux is preventing hdparm from 'open' accesses on the blk_file /dev/nvme0n1.

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

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

Additional Information:
Source Context                system_u:system_r:tlp_t:s0
Target Context                system_u:object_r:nvme_device_t:s0
Target Objects                /dev/nvme0n1 [ blk_file ]
Source                        hdparm
Source Path                   hdparm
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.2-51.fc29.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.20.16-200.fc29.x86_64 #1 SMP Thu
                              Mar 14 15:10:22 UTC 2019 x86_64 x86_64
Alert Count                   4
First Seen                    2019-03-27 16:29:51 AEDT
Last Seen                     2019-03-29 07:45:36 AEDT
Local ID                      142eb396-2959-47d3-a459-efa9685ef534

Raw Audit Messages
type=AVC msg=audit(1553805936.754:1187): avc:  denied  { open } for  pid=21331 comm="hdparm" path="/dev/nvme0n1" dev="devtmpfs" ino=17037 scontext=system_u:system_r:tlp_t:s0 tcontext=system_u:object_r:nvme_device_t:s0 tclass=blk_file permissive=0


Hash: hdparm,tlp_t,nvme_device_t,blk_file,open

Version-Release number of selected component:
selinux-policy-3.14.2-51.fc29.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         4.20.16-200.fc29.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2019-03-29 06:40:41 UTC

*** This bug has been marked as a duplicate of bug 1692154 ***


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