Bug 464737 - Missing suggestion when using alternate SSH port
Missing suggestion when using alternate SSH port
Product: Fedora
Classification: Fedora
Component: setroubleshoot-plugins (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Thomas Liu
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-09-29 22:28 EDT by Arthur Pemberton
Modified: 2009-06-29 10:50 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-06-29 10:48:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output of sealert -l 28e7eaf0-bce4-42f1-b115-5a6ab234c03f (2.40 KB, text/plain)
2008-09-30 11:16 EDT, Arthur Pemberton
no flags Details
Output of sealert -l 82267d8b-d557-4891-bdb0-26e0feb1e986 (2.52 KB, text/plain)
2008-09-30 11:17 EDT, Arthur Pemberton
no flags Details

  None (edit)
Description Arthur Pemberton 2008-09-29 22:28:46 EDT
Description of problem:
SELinux denies SSHd when attempting to use an alternate port (23). setroubleshoto suggests writing a custom policy.

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

How reproducible:
Every time

Steps to Reproduce:
1. add a non-standard port to /etc/ssh/sshd_config
2. service sshd restart
3. check /var/log/messages
Actual results:
sealert -l 28e7eaf0-bce4-42f1-b115-5a6ab234c03f

Expected results:
semanage port -m -t ssh_port_t -p tcp 23

Additional info:
Doing `semanage port -m -t ssh_port_t -p tcp 23` itself leads to another denial, I haven't verified that port 23 works as expected. Doing ssh -p 23 from another machine did however work:
sealert -l 82267d8b-d557-4891-bdb0-26e0feb1e986
Comment 1 Daniel Walsh 2008-09-30 11:05:10 EDT
Please attach the output

sealert -l  82267d8b-d557-4891-bdb0-26e0feb1e986 
only works on your machine.
Comment 2 Arthur Pemberton 2008-09-30 11:16:06 EDT
Created attachment 318089 [details]
Output of sealert -l 28e7eaf0-bce4-42f1-b115-5a6ab234c03f
Comment 3 Arthur Pemberton 2008-09-30 11:17:13 EDT
Created attachment 318090 [details]
Output of sealert -l 82267d8b-d557-4891-bdb0-26e0feb1e986
Comment 4 Daniel Walsh 2008-09-30 11:47:34 EDT
Not sure what is causing the second avc.  The semanage command looks like it fixed your real problem.

The second avc looks like a leaked file descriptor, from the unconfined processess that was used to restart sshd.  Did you restart sshd from a gui?

It can be ignored, as it is really not blocking anything.
Comment 5 Arthur Pemberton 2008-09-30 11:53:28 EDT
no, I just did a `service sshd restart` from the shell. As you noted, it seems like the actual semanage worked, this is why I did not file a bug for it.
Comment 6 Daniel Walsh 2008-10-01 08:28:46 EDT
Then this looks like you have a leaked file descriptor in your shell.  What virtual terminal were you using? If you ls -l /proc/self/fd does it show anything interesting?
Comment 7 Arthur Pemberton 2008-10-03 01:29:31 EDT
I am using Konsole

# ls -l /proc/self/fd
total 0
lrwx------ 1 root root 64 2008-10-03 00:28 0 -> /dev/pts/2
lrwx------ 1 root root 64 2008-10-03 00:28 1 -> /dev/pts/2
lrwx------ 1 root root 64 2008-10-03 00:28 2 -> /dev/pts/2
lr-x------ 1 root root 64 2008-10-03 00:28 3 -> /proc/8180/fd
Comment 8 Daniel Walsh 2008-10-03 09:49:41 EDT
And if you execute service sshd restart right now, does it generate the avc?
Comment 9 Arthur Pemberton 2009-05-04 02:27:08 EDT
This issue is pretty old. I am currently on F10, and there are of course no problems as I am on a default setup.

The original issue should have been filed as an RFE to provide the user with a suggestion on how to `semanage` their new port of choice to sshd
Comment 10 Bug Zapper 2009-06-09 22:50:45 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 11 Daniel Walsh 2009-06-29 10:48:20 EDT
ssh is now allowed to bind to any port so this is not a bug anymore.  We need to allow ssh to bind to all ports in order to allow port forwarding.

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