From nobody@FreeBSD.org  Thu Jan  5 22:59:47 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 503A7106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  5 Jan 2012 22:59:47 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 3E2118FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  5 Jan 2012 22:59:47 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q05Mxlmc062988
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 5 Jan 2012 22:59:47 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q05Mxl1s062984;
	Thu, 5 Jan 2012 22:59:47 GMT
	(envelope-from nobody)
Message-Id: <201201052259.q05Mxl1s062984@red.freebsd.org>
Date: Thu, 5 Jan 2012 22:59:47 GMT
From: "S. Chen" <sp1024@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Modified VersionAddendum field in sshd_config missing from SSH protocol string
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         163843
>Category:       conf
>Synopsis:       [sshd_config] Modified VersionAddendum field in sshd_config missing from SSH protocol string
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rea
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 05 23:00:29 UTC 2012
>Closed-Date:    Sun Jun 10 08:53:21 UTC 2012
>Last-Modified:  Sun Jun 10 08:53:21 UTC 2012
>Originator:     S. Chen
>Release:        9.0-RC3
>Organization:
>Environment:
FreeBSD host.domain.local 9.0-RC3 FreeBSD 9.0-RC3 #0: Sun Dec  4 08:56:36 UTC 2011     root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
In the SSH daemon's configuration file, sshd_config, a variable named "VersionAddendum" can be used to modify the additional version information appended to a typical SSH protocol version string.  However, when the variable is set, the value does not appear and yields a slightly malformed SSH protocol version string.

The full, default version string looks like the following.  Stock config used.

> echo | nc 127.0.0.1 22
SSH-2.0-OpenSSH_5.8p2_hpn13v11 FreeBSD-20110503


The version string when config is set to "VersionAddendum abc", follows.  Note the space between the SSH version and "_hpn13v11", and it's missing "abc".

> diff -u sshd_config.old sshd_config
-#VersionAddendum FreeBSD-20110503
+VersionAddendum abc

> echo | nc 127.0.0.1 22
SSH-2.0-OpenSSH_5.8p2 _hpn13v11

>How-To-Repeat:
1) Modify /etc/ssh/sshd_config, and change the "VersionAddendum" variable to something else (e.g. "abc").
2) Restart sshd (e.g. /etc/rc.d/sshd restart).
3) Retrieve the SSH version string from port 22 (e.g. "echo | nc 127.0.0.1 22).  Check for missing variable set in step 1.

>Fix:


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: rea 
State-Changed-When: Sat May 19 12:10:22 UTC 2012 
State-Changed-Why:  
Posted patch for testing and review. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163843 
Responsible-Changed-From-To: freebsd-bugs->rea 
Responsible-Changed-By: rea 
Responsible-Changed-When: Sat May 19 12:11:34 UTC 2012 
Responsible-Changed-Why:  
Grab. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163843 

From: Eygene Ryabinkin <rea@freebsd.org>
To: FreeBSD GNATS followup <bug-followup@freebsd.org>
Cc: des@freebsd.org
Subject: conf/163843: [sshd_config] Modified VersionAddendum field in
 sshd_config missing from SSH protocol string
Date: Sat, 19 May 2012 16:09:55 +0400

 --zYM0uCDKw75PZbzx
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Could you, please, try the patch from
   http://codelabs.ru/fbsd/patches/openssh/OpenSSH-fix-VersionAddendum-handl=
 ing.diff
 
 In a nutshell:
 {{{
 cd /usr/src
 fetch -o ssh-addendum.diff http://codelabs.ru/fbsd/patches/openssh/OpenSSH-=
 fix-VersionAddendum-handling.diff
 patch -p1 < ssh-addendum.diff
 cd secure/lib/libssh
 make && make install && service sshd restart
 }}}
 should make your SSH to understand VersionAddendum again.
 
 Had tested this both on -CURRENT, 9-STABLE and 8-STABLE:
 works for me.
 
 Dag-Erling, could you, please review this patch?
 
 Thanks!
 --=20
 Eygene Ryabinkin                                        ,,,^..^,,,
 [ Life's unfair - but root password helps!           | codelabs.ru ]
 [ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
 
 --zYM0uCDKw75PZbzx
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (FreeBSD)
 
 iF4EABEIAAYFAk+3jZMACgkQFq+eroFS7PvDYAD/a+3mZt0ZHJbobxlUFcL5G4OM
 +rpzkrhlL5dlXWUw8c0A/3dGwCBHt8OaYcmRUsoW0fkY/oGLqqvZ9tpV4HdMbiVq
 =vB4g
 -----END PGP SIGNATURE-----
 
 --zYM0uCDKw75PZbzx--

From: Eygene Ryabinkin <rea@FreeBSD.org>
To: FreeBSD GNATS followup <bug-followup@freebsd.org>
Cc:  
Subject: Re: conf/163843: [sshd_config] Modified VersionAddendum field in
 sshd_config missing from SSH protocol string
Date: Sat, 19 May 2012 17:52:14 +0400

 --p4qYPpj5QlsIQJ0K
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 As Google's MX said,
 {{{
 <sp1024@gmail.com>: host gmail-smtp-in.l.google.com[173.194.79.27] said:
     550-5.1.1 The email account that you tried to reach does not exist. Ple=
 ase
     try 550-5.1.1 double-checking the recipient's email address for typos or
     550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1
     http://support.google.com/mail/bin/answer.py?answer=3D6596
     rm6si11896253pbc.305 (in reply to RCPT TO command)
 }}}
 so, most likely, there could be no reaction from the ticket submitter,
 because he won't get notifications about this PR.
 
 But if submitter reads this: please, supply a valid e-mail address.
 --=20
 Eygene Ryabinkin                                        ,,,^..^,,,
 [ Life's unfair - but root password helps!           | codelabs.ru ]
 [ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
 
 --p4qYPpj5QlsIQJ0K
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (FreeBSD)
 
 iF4EABEIAAYFAk+3pY4ACgkQFq+eroFS7PtNtAD/bJvhJfVQfBcmtesQhIhwIY07
 rFPeYw+zJ7AXGusiQYMBAI5m9FKCPlvtxeC7yO1OxSD692aarHG7zh1/T+uJYhMx
 =HPgK
 -----END PGP SIGNATURE-----
 
 --p4qYPpj5QlsIQJ0K--

From: Eygene Ryabinkin <rea@FreeBSD.org>
To: FreeBSD GNATS followup <bug-followup@freebsd.org>
Cc:  
Subject: Re: conf/163843: [sshd_config] Modified VersionAddendum field in
 sshd_config missing from SSH protocol string
Date: Sun, 20 May 2012 14:28:26 +0400

 --1EKig6ypoSyM7jaD
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Reuploaded modified patch that addresses first comments from bz@,
 the URL is the same
   http://codelabs.ru/fbsd/patches/openssh/OpenSSH-fix-VersionAddendum-handl=
 ing.diff
 
 The quick'n'dirty way to recompile SSH was slightly changed,
 {{{
 cd /usr/src
 fetch -o ssh-addendum.diff http://codelabs.ru/fbsd/patches/openssh/OpenSSH-=
 fix-VersionAddendum-handling.diff
 patch -p1 < ssh-addendum.diff
 cd /usr/src/secure/lib/libssh
 make && make install
 cd /usr/src/secure/usr.sbin/sshd
 make && make install && service sshd restart
 cd /usr/src/secure/usr.bin/ssh
 make && make install
 }}}
 --=20
 Eygene Ryabinkin                                        ,,,^..^,,,
 [ Life's unfair - but root password helps!           | codelabs.ru ]
 [ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
 
 --1EKig6ypoSyM7jaD
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (FreeBSD)
 
 iF4EABEIAAYFAk+4x0oACgkQFq+eroFS7PtfWwD/SqBQ+rmfdnSg95zKsiFB6Jg2
 M84R6tt0y8rb7wTzmAsBAIV/6uz0rf4IaoZF3ybxdofRnJSgQEoSeXjogYhNxikJ
 =Z0Yv
 -----END PGP SIGNATURE-----
 
 --1EKig6ypoSyM7jaD--

From: Eygene Ryabinkin <rea@FreeBSD.org>
To: FreeBSD GNATS followup <bug-followup@freebsd.org>
Cc:  
Subject: Re: conf/163843: [sshd_config] Modified VersionAddendum field in
 sshd_config missing from SSH protocol string
Date: Wed, 23 May 2012 11:05:26 +0400

 --rJwd6BRFiFCcLxzm
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Here are patches for 8-STABLE and 9-STABLE,
   http://codelabs.ru/fbsd/patches/openssh/OpenSSH-fix-VersionAddendum-handl=
 ing-8-STABLE.diff
   http://codelabs.ru/fbsd/patches/openssh/OpenSSH-fix-VersionAddendum-handl=
 ing-9-STABLE.diff
 --=20
 Eygene Ryabinkin                                        ,,,^..^,,,
 [ Life's unfair - but root password helps!           | codelabs.ru ]
 [ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
 
 --rJwd6BRFiFCcLxzm
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (FreeBSD)
 
 iF4EABEIAAYFAk+8jDYACgkQFq+eroFS7PuuGQD8DorgqowzwEhJ1+5WR5Bwfvd7
 mH02lJ+NZ0FZe/ArtdYA/0e/23BroU2lwsjh9rGPJu2amRhQNnRW0U8pzB/LpHCZ
 =6YT3
 -----END PGP SIGNATURE-----
 
 --rJwd6BRFiFCcLxzm--

From: Eygene Ryabinkin <rea@FreeBSD.org>
To: FreeBSD GNATS followup <bug-followup@freebsd.org>
Cc:  
Subject: Re: conf/163843: [sshd_config] Modified VersionAddendum field in
 sshd_config missing from SSH protocol string
Date: Sat, 26 May 2012 14:41:56 +0400

 --yNb1oOkm5a9FJOVX
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Posted call for review and testing in FreeBSD-current mailing list,
   http://lists.freebsd.org/pipermail/freebsd-current/2012-May/034273.html
 --=20
 Eygene Ryabinkin                                        ,,,^..^,,,
 [ Life's unfair - but root password helps!           | codelabs.ru ]
 [ 82FE 06BC D497 C0DE 49EC  4FF0 16AF 9EAE 8152 ECFB | freebsd.org ]
 
 --yNb1oOkm5a9FJOVX
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (FreeBSD)
 
 iF4EABEIAAYFAk/As3MACgkQFq+eroFS7PuSbgD+O9dniReEzUI6WC27E3dXyX+g
 fYf9zuaTMy1QppbF9xUA/04ZP+6bxS+n7MkdLU0/hCZ2qkH0nyeThe4AXn3uXyuv
 =xH2P
 -----END PGP SIGNATURE-----
 
 --yNb1oOkm5a9FJOVX--
State-Changed-From-To: feedback->closed 
State-Changed-By: rea 
State-Changed-When: Sun Jun 10 08:52:50 UTC 2012 
State-Changed-Why:  
Fix committed into HEAD, 9-STABLE and 8-STABLE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=163843 
>Unformatted:
