Bug 2355217 - Selinux prevents NetworkManager-ssh connecting to remote ports that are not 22
Summary: Selinux prevents NetworkManager-ssh connecting to remote ports that are not 22
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager-ssh
Version: 41
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Dan Fruehauf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-03-27 02:00 UTC by Dan Fruehauf
Modified: 2025-04-05 01:25 UTC (History)
2 users (show)

Fixed In Version: NetworkManager-ssh-1.3.1-1.fc42 NetworkManager-ssh-1.3.1-1.fc41
Clone Of:
Environment:
Last Closed: 2025-03-31 01:23:59 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dan Fruehauf 2025-03-27 02:00:50 UTC
Selinux prevents NetworkManager-ssh connecting to remote ports that are not 22

Reproducible: Always

Steps to Reproduce:
1. Create a connection with a custom port (not 22)
2. Try to connect
Actual Results:  
Connection fails with selinux logs:
Mar 27 12:57:19 fed setroubleshoot[665036]: SELinux is preventing ssh from name_connect access on the tcp_socket port 40111. For complete SELinux messages run: sealert -l 627431f3-51ef-4ab7-b2fc-e88d3a87c3ee
Mar 27 12:57:19 fed setroubleshoot[665036]: SELinux is preventing ssh from name_connect access on the tcp_socket port 40111.#012#012*****  Plugin catchall_boolean (89.3 confidence) suggests   ******************#012#012If you want to allow system to run with NIS#012Then you must tell SELinux about this by enabling the 'nis_enabled' boolean.#012#012Do#012setsebool -P nis_enabled 1#012#012*****  Plugin catchall (11.6 confidence) suggests   **************************#012#012If you believe that ssh should be allowed name_connect access on the port 40111 tcp_socket by default.#012Then you should report this as a bug.#012You can generate a local policy module to allow this access.#012Do#012allow this access for now by executing:#012# ausearch -c 'ssh' --raw | audit2allow -M my-ssh#012# semodule -X 300 -i my-ssh.pp#012

Expected Results:  
Connection should succeed, and not be blocked by selinux

Upstream 1.3.1 solves that problem

Comment 1 Fedora Update System 2025-03-27 03:50:13 UTC
FEDORA-2025-6990b43b90 (NetworkManager-ssh-1.3.1-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-6990b43b90

Comment 2 Fedora Update System 2025-03-27 05:46:10 UTC
FEDORA-2025-41fa3e7158 (NetworkManager-ssh-1.3.1-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-41fa3e7158

Comment 3 Fedora Update System 2025-03-28 15:25:52 UTC
FEDORA-2025-6990b43b90 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-6990b43b90`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-6990b43b90

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2025-03-28 16:18:02 UTC
FEDORA-2025-41fa3e7158 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-41fa3e7158`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-41fa3e7158

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2025-03-31 01:23:59 UTC
FEDORA-2025-6990b43b90 (NetworkManager-ssh-1.3.1-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2025-04-05 01:25:45 UTC
FEDORA-2025-41fa3e7158 (NetworkManager-ssh-1.3.1-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


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