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 2089486 - Tor with DNSPort
Summary: Tor with DNSPort
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: selinux-policy
Version: CentOS Stream
Hardware: x86_64
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Nikola Knazekova
QA Contact: Milos Malik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-23 19:30 UTC by lejeczek
Modified: 2022-11-15 12:58 UTC (History)
7 users (show)

Fixed In Version: selinux-policy-34.1.41-1.el9
Doc Type: Bug Fix
Doc Text:
Cause: Missing policy rule to allow tor bind UDP sockets to all ports Consequence: SELinux prevents tor to name_bind DNSport Fix: Update tor_bind_all_unreserved_ports interface to allow tor bind UDP sockets to all ports > 1024. Result: No AVC
Clone Of:
Environment:
Last Closed: 2022-11-15 11:13:50 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-123041 0 None None None 2022-05-23 19:31:08 UTC
Red Hat Product Errata RHBA-2022:8283 0 None None None 2022-11-15 11:14:09 UTC

Description lejeczek 2022-05-23 19:30:27 UTC
Description of problem:

Hi guys.

These:
semanage port -a -p tcp -t tor_port_t 5553
setsebool -P tor_bind_all_unreserved_ports 1

do not seem enough for Tor with:

DNSPort 5553

I still get:

allow tor_t tor_port_t:udp_socket name_bind;

perhaps more.
It'd be great to have policy account for such Tor.

many thanks

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

selinux-policy-34.1.31-2.el9.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Zdenek Pytela 2022-06-02 12:46:06 UTC
Hi,

The tor_bind_all_unreserved_ports boolean effects only tcp ports. Is it an option for you to label the port dns_port_t instead?

rhel91# sesearch -A -s tor_t -t dns_port_t -c udp_socket -p name_bind
allow tor_t dns_port_t:udp_socket name_bind;

Comment 2 lejeczek 2022-06-07 09:56:59 UTC
I can, as anybody do that, generate custom module, etc. - still - something like a boolean could/should cover this, for the sake of all users & out-of-box.
thanks, L

Comment 10 errata-xmlrpc 2022-11-15 11:13:50 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.