Bug 1996243 - SELinux is preventing smartd from 'ioctl' accesses on the chr_file /dev/nvme0.
Summary: SELinux is preventing smartd from 'ioctl' accesses on the chr_file /dev/nvme0.
Keywords:
Status: CLOSED DUPLICATE of bug 1990463
Alias: None
Product: Fedora
Classification: Fedora
Component: smartmontools
Version: 33
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:621a5b014dc85f0717fdc35e7c9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-21 03:08 UTC by C L
Modified: 2021-08-24 21:15 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-08-24 21:15:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description C L 2021-08-21 03:08:25 UTC
Description of problem:
Upgraded packages
SELinux is preventing smartd from 'ioctl' accesses on the chr_file /dev/nvme0.

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

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

Additional Information:
Source Context                system_u:system_r:fsdaemon_t:s0
Target Context                system_u:object_r:nvme_device_t:s0
Target Objects                /dev/nvme0 [ chr_file ]
Source                        smartd
Source Path                   smartd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.6-39.fc33.noarch
Local Policy RPM              smartmontools-selinux-7.2-7.fc33.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.13.10-100.fc33.x86_64 #1 SMP Thu
                              Aug 12 21:15:41 UTC 2021 x86_64 x86_64
Alert Count                   88
First Seen                    2021-08-14 09:53:07 AWST
Last Seen                     2021-08-21 10:44:14 AWST
Local ID                      200a6dac-d7b6-495b-a69f-16e2f5cef913

Raw Audit Messages
type=AVC msg=audit(1629513854.192:602): avc:  denied  { ioctl } for  pid=849 comm="smartd" path="/dev/nvme0" dev="devtmpfs" ino=245 ioctlcmd=0x4e41 scontext=system_u:system_r:fsdaemon_t:s0 tcontext=system_u:object_r:nvme_device_t:s0 tclass=chr_file permissive=1


Hash: smartd,fsdaemon_t,nvme_device_t,chr_file,ioctl

Version-Release number of selected component:
selinux-policy-targeted-3.14.6-39.fc33.noarch

Additional info:
component:      smartmontools
reporter:       libreport-2.15.2
hashmarkername: setroubleshoot
kernel:         5.13.10-100.fc33.x86_64
type:           libreport

Comment 1 Michal Hlavinka 2021-08-24 21:15:11 UTC

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


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