Bug 1364595 - sshd reports wrong version in banner
Summary: sshd reports wrong version in banner
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 24
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-05 21:03 UTC by Michael Hampton
Modified: 2016-08-09 07:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-09 07:05:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Michael Hampton 2016-08-05 21:03:44 UTC
Description of problem:
When connecting to sshd on port 22, sshd reports itself as version 7.2, rather than 7.2p2.


Version-Release number of selected component (if applicable):
openssh-7.2p2-11.fc24.x86_64


How reproducible:
Always


Steps to Reproduce:
1. nc localhost 22


Actual results:
SSH-2.0-OpenSSH_7.2


Expected results:
SSH-2.0-OpenSSH_7.2p2


Additional info:
This is causing an issue where external security scanners misidentify sshd as an older version, causing false positives on scan reports.

Other distributions appear to report the version correctly. Debian stretch reports:
SSH-2.0-OpenSSH_7.2p2 Debian-5

Comment 1 Jakub Jelen 2016-08-08 07:12:11 UTC
Thank you for the report.

The portable version was removed from the SSH_VERSION constant in 2004 [1], but the sshd identification string was not updated to contain the portable suffix since then.

This seems like a bug in portable openssh somehow worked around in Debian using their patches [2] (7.3p2).

Not sure if it is intentional or not. I will send a mail to portable upstream to check if this is intention or not.

Client identification string does not contain this information either (upstream) and Debian patches it into sshconnect, but not into the ssh_api.c [3]

[1] https://github.com/openssh/openssh-portable/commit/2aa6d3cf
[2] https://anonscm.debian.org/cgit/pkg-ssh/openssh.git/commit/?id=c81054
[3] https://anonscm.debian.org/cgit/pkg-ssh/openssh.git/tree/ssh_api.c#n389

Comment 2 Jakub Jelen 2016-08-09 06:18:11 UTC
This is Intention from Portable upstream and a bug in Debian, according to upstream [1]. I wrote probably too fast to read the commit messages properly.

Let me know, if you need some more clarification or I can close this bug.

[1] http://lists.mindrot.org/pipermail/openssh-unix-dev/2016-August/035302.html


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