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 2174294 - wg-quick@.service fails if endpoint contains dns name
Summary: wg-quick@.service fails if endpoint contains dns name
Keywords:
Status: CLOSED DUPLICATE of bug 2149452
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: wireguard-tools
Version: 9.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Hangbin Liu
QA Contact: liujian
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-01 03:44 UTC by Cory Bolar
Modified: 2023-03-01 07:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-01 07:01:17 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-150239 0 None None None 2023-03-01 03:45:38 UTC

Description Cory Bolar 2023-03-01 03:44:31 UTC
Description of problem:
wg-quick@.service fails if endpoint contains dns name

Version-Release number of selected component (if applicable):
1.0.20210914

How reproducible:
Attempt to start the wg-quick@.service using a configuration file containing a peer with an Endpoint = <dns-name>:port with SELinux enforcing and with SELinux permissive.

wg-quick@.service fails with "Name or service not known: '<dns-name>:51820'"

Initial selinux issues worked around with the following policy but no further audit log denial entries appear.

require {
        type net_conf_t;
        type wireguard_t;
        class udp_socket { connect create getattr setopt };
        class file { getattr open read };
}

#============= wireguard_t ==============

#!!!! This avc is allowed in the current policy
allow wireguard_t net_conf_t:file { getattr open read };

#!!!! This avc is allowed in the current policy
allow wireguard_t self:udp_socket { connect create setopt };
allow wireguard_t self:udp_socket getattr;

Steps to Reproduce:
1. Create wg-quick configuration file, wg0.conf, with Peer section containing `Endpoint = <dns-name>:port`
2. systemctl start wg-quick

Actual results:
Service fails to start.  Logs show error "Name or service not known" 

Expected results:
Service starts successfully.

Additional info:
'setenforce 0' allows the service to start successfully.  Additionally, manual calls of wg-quick up <conf-file> work with and without selinux in enforcing mode.  Failure is only observed in systemd service.

Comment 1 Hangbin Liu 2023-03-01 07:01:17 UTC

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


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