-
Bug
-
Resolution: Done-Errata
-
Normal
-
rhel-9.4
-
selinux-policy-38.1.41-1.el9
-
None
-
None
-
1
-
rhel-sst-security-selinux
-
ssg_security
-
20
-
None
-
QE ack
-
False
-
-
No
-
CY24Q2
-
Unspecified Release Note Type - Unknown
-
None
What were you trying to do that didn't work?
selinux policy doesn't allow timemaster to configure virtual clocks by writing to /sys. This functionality was added in RHEL9.1, but it seems nobody requested the selinux policy to cover it.
Please provide the package NVR for which bug is seen:
selinux-policy-38.1.35-1.el9_4.noarch
How reproducible:
Reproducible with a NIC which supports HW timestamping
Steps to reproduce
- install linuxptp
- specify a PTP domain in /etc/timemaster.conf with an interface which has hardware timestamping (ethtool -T prints hardware-raw-clock capability). The PTP domain doesn't need to be provided in the network. For example:
[ptp_domain 0] interfaces enp1s0
- start timemaster
Expected results
timemaster running and no reported AVCs
Actual results
timemaster gives up and reported AVCs
type=AVC msg=audit(1710170769.424:453): avc: denied { read } for pid=18663 comm="timemaster" name="ptp0" dev="sysfs" ino=30545 scontext=system_u:system_r:timemaster_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=lnk_file permissive=1 type=AVC msg=audit(1710170769.424:453): avc: denied { write } for pid=18663 comm="timemaster" name="n_vclocks" dev="sysfs" ino=30557 scontext=system_u:system_r:timemaster_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 type=AVC msg=audit(1710170769.424:453): avc: denied { open } for pid=18663 comm="timemaster" path="/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ptp/ptp0/n_vclocks" dev="sysfs" ino=30557 scontext=system_u:system_r:timemaster_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 type=AVC msg=audit(1710170769.424:454): avc: denied { getattr } for pid=18663 comm="timemaster" path="/sys/devices/pci0000:00/0000:00:1c.0/0000:01:00.0/ptp/ptp0/n_vclocks" dev="sysfs" ino=30557 scontext=system_u:system_r:timemaster_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=file permissive=1 type=AVC msg=audit(1710170769.441:457): avc: denied { read } for pid=19357 comm="timemaster" name="ptp0" dev="sysfs" ino=30541 scontext=system_u:system_r:timemaster_t:s0 tcontext=system_u:object_r:sysfs_t:s0 tclass=dir permissive=1
- links to
-
RHBA-2024:130707 selinux-policy bug fix and enhancement update