Bug 1754800 - SELinux is preventing timedatex from 'execute' accesses on the file /usr/sbin/hwclock.
Summary: SELinux is preventing timedatex from 'execute' accesses on the file /usr/sbin...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 31
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Patrik Koncity
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:33d74d4a349715a2e1522d4b242...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-24 06:11 UTC by Munir Bhatti
Modified: 2019-10-29 01:27 UTC (History)
5 users (show)

Fixed In Version: selinux-policy-3.14.4-39.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-29 01:27:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Munir Bhatti 2019-09-24 06:11:22 UTC
Description of problem:
trying to use timedatectl and running into permissions issues even when using sudo
SELinux is preventing timedatex from 'execute' accesses on the file /usr/sbin/hwclock.

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

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

Additional Information:
Source Context                system_u:system_r:timedatex_t:s0
Target Context                system_u:object_r:hwclock_exec_t:s0
Target Objects                /usr/sbin/hwclock [ file ]
Source                        timedatex
Source Path                   timedatex
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           util-linux-2.34-3.fc31.x86_64
Policy RPM                    selinux-policy-3.14.4-35.fc31.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 5.3.0-1.fc31.x86_64 #1 SMP Mon Sep
                              16 12:34:42 UTC 2019 x86_64 x86_64
Alert Count                   1
First Seen                    2019-09-26 19:02:21 PDT
Last Seen                     2019-09-26 19:02:21 PDT
Local ID                      b2d3e2b7-5cf8-4632-90e5-f1c13ceccce4

Raw Audit Messages
type=AVC msg=audit(1569549741.36:392): avc:  denied  { execute } for  pid=6755 comm="timedatex" name="hwclock" dev="dm-0" ino=146833 scontext=system_u:system_r:timedatex_t:s0 tcontext=system_u:object_r:hwclock_exec_t:s0 tclass=file permissive=0


Hash: timedatex,timedatex_t,hwclock_exec_t,file,execute

Version-Release number of selected component:
selinux-policy-3.14.4-35.fc31.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.3.0-1.fc31.x86_64
type:           libreport

Comment 1 Fedora Update System 2019-10-26 16:59:19 UTC
FEDORA-2019-7d65c50fd6 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7d65c50fd6

Comment 2 Fedora Update System 2019-10-27 04:02:46 UTC
selinux-policy-3.14.4-39.fc31 has been pushed to the Fedora 31 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-2019-7d65c50fd6

Comment 3 Fedora Update System 2019-10-29 01:27:45 UTC
selinux-policy-3.14.4-39.fc31 has been pushed to the Fedora 31 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.