Bug 2565816 - SSH remote forwarding to TCP port 8080 is blocked by SELinux
Summary: SSH remote forwarding to TCP port 8080 is blocked by SELinux
Keywords:
Status: CLOSED DUPLICATE of bug 2523732
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 45
Hardware: x86_64
OS: Linux
high
unspecified
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-11-03 14:37 UTC by Petr Sklenar
Modified: 2026-11-10 14:18 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-11-10 14:18:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github fedora-selinux selinux-policy pull 3507 0 None open Allow sshd-session bind and connect to all tcp ports 2026-11-10 14:10:15 UTC

Description Petr Sklenar 2026-11-03 14:37:49 UTC
Description:
On Fedora 45, SSH remote TCP forwarding to port 8080 fails when SELinux is enforcing. The same command works when SELinux is permissive.

Version-Release number:
Fedora 45 Workstation x86_64, running in KVM
Kernel: 7.3.1-200.fc45.x86_64
selinux-policy-45.23-1.fc45.noarch
openssh-server-10.5p1-1.fc45.x86_64

How reproducible:
Always in this test.

Steps to Reproduce:
1. Set SELinux to enforcing:
   setenforce 1
2. Run:
   ssh -R 8080:127.0.0.1:80 root@localhost 'ss -n -l -t | grep :8080'

Actual Results:
SSH prints:
Warning: remote port forwarding failed for listen port 8080

Expected Results:
The remote forward should work while SELinux is enforcing.

With SELinux permissive, the same command succeeds and shows listeners on 127.0.0.1:8080 and [::1]:8080.

AVC:
avc: denied { name_bind } for comm=sshd-session src=8080
scontext=system_u:system_r:sshd_session_t:s0-s0:c0.c1023
tcontext=system_u:object_r:http_cache_port_t:s0
tclass=tcp_socket permissive=0

Port 8080 is labeled http_cache_port_t (semanage port -l).

Related bugs:
BZ 2560255: https://bugzilla.redhat.com/show_bug.cgi?id=2560255
That bug reports OpenSSH agent forwarding and Unix socket problems. This report may be related, but it is a different reproducer and AVC.

BZ 2523732: https://bugzilla.redhat.com/show_bug.cgi?id=2523732
This reports another sshd_session_t forwarding denial, mainly name_connect.

BZ 2526123: https://bugzilla.redhat.com/show_bug.cgi?id=2526123
This is the earlier closed SELinux forwarding bug for Fedora 44.

Comment 1 Zdenek Pytela 2026-11-10 14:18:34 UTC

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


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