RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2118631 - [RHEL9] chronyd not allowed to bind to PTP event port
Summary: [RHEL9] chronyd not allowed to bind to PTP event port
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: 9.1
Hardware: Unspecified
OS: Linux
low
medium
Target Milestone: rc
: 9.1
Assignee: Nikola Knazekova
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-08-16 10:08 UTC by Miroslav Lichvar
Modified: 2022-11-15 12:59 UTC (History)
4 users (show)

Fixed In Version: selinux-policy-34.1.41-1.el9
Doc Type: Bug Fix
Doc Text:
Cause: selinux policy prevents chronyd from binding to the PTP socket 319. Consequence: chronyd cannot get access to timestamping PTP event messages containing NTP messages. Fix: Label port 319/udp with ptp_event_port_t and allow chronyd bind UDP sockets to ptp_event ports. Result: No AVC denials
Clone Of:
Environment:
Last Closed: 2022-11-15 11:14:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-131191 0 None None None 2022-08-16 10:13:47 UTC
Red Hat Product Errata RHBA-2022:8283 0 None None None 2022-11-15 11:14:21 UTC

Description Miroslav Lichvar 2022-08-16 10:08:43 UTC
This bug was initially created as a copy of Bug #2118628

I am copying this bug because: 
The same issue is observed on RHEL9 with the following packages:
selinux-policy-34.1.34-1.el9.noarch
chrony-4.2-1.el9.x86_64


Description of problem:
As a new feature added in chrony-4.2, chronyd supports an experimental NTP-over-PTP protocol in order to get HW timestamps on NICs which can timestamp PTP packets but not NTP packets.

The selinux policy seems to be preventing chronyd from binding to the PTP socket 319.

In system log:
Aug 16 11:56:33 rhel8 chronyd[974]: Could not open NTP socket on 0.0.0.0:319
Aug 16 11:56:33 rhel8 chronyd[974]: Could not open NTP socket on [::]:319

In audit log:
type=AVC msg=audit(1660643793.324:174): avc:  denied  { name_bind } for  pid=974 comm="chronyd" src=319 scontext=system_u:system_r:chronyd_t:s0 tcontext=system_u:object_r:reserved_port_t:s0 tclass=udp_socket permissive=0

With disabled enforcing there are no other messages.

Version-Release number of selected component (if applicable):
selinux-policy-3.14.3-106.el8.noarch
chrony-4.2-1.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. cat <<EOF >> /etc/chrony.conf
allow
ptpport 319
server 127.0.0.1 port 319 minpoll 0 maxpoll 0
EOF
2. systemctl restart chronyd
3. wait 5 seconds
4. chronyc ntpdata 127.0.0.1 | grep 'Total RX'

Actual results:
0

Expected results:
> 0

Additional info:

Comment 16 errata-xmlrpc 2022-11-15 11:14:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (selinux-policy bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8283


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