From nobody@FreeBSD.org  Sat May 27 16:41:03 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id D9B1316C2A0
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 May 2006 16:41:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 283C043D58
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 May 2006 16:40:56 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k4RGeuHA041898
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 27 May 2006 16:40:56 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k4RGeuNP041897;
	Sat, 27 May 2006 16:40:56 GMT
	(envelope-from nobody)
Message-Id: <200605271640.k4RGeuNP041897@www.freebsd.org>
Date: Sat, 27 May 2006 16:40:56 GMT
From: miks <miks@skynet.lv>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Buffer problem with SSH2 under amd64
X-Send-Pr-Version: www-2.3

>Number:         98016
>Category:       amd64
>Synopsis:       Buffer problem with SSH2 under amd64
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    marius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 27 16:50:16 GMT 2006
>Closed-Date:    Mon Aug 28 00:17:40 GMT 2006
>Last-Modified:  Mon Aug 28 00:17:40 GMT 2006
>Originator:     miks
>Release:        freebsd 6.0
>Organization:
skynet
>Environment:
FreeBSD sun 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu May 25 14:35:44 UTC 2006
>Description:
This is a problem with ssh2 (ssh2-nox11-3.2.9.1_5 Secure shell client and server for V.2 SSH protocol).
It seems broken under this freebsd release (6.0 amd64).

[root@sun /home]# ssh -v test@192.168.1.19
OpenSSH_4.2p1 FreeBSD-20050903, OpenSSL 0.9.7e-p1 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 192.168.1.19 [192.168.1.19] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version 3.2.9.1 SSH Secure Shell (non-commercial)
debug1: no match: 3.2.9.1 SSH Secure Shell (non-commercial)
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.2p1 FreeBSD-20050903
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host '192.168.1.19' is known and matches the DSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug1: ssh_dss_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: password
test@192.168.1.19's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
buffer_get_ret: trying to get more bytes 1 than in buffer 0
buffer_get_char_ret: buffer_get_ret failed
buffer_get_char: buffer error


in fact: "[root@sun /home]# ssh test@localhost" works fine.

some kind of problems with DNS?
>How-To-Repeat:
just login in system with amd64 release and ssh2
>Fix:

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->marius 
Responsible-Changed-By: arved 
Responsible-Changed-When: Sat Jul 29 21:19:09 UTC 2006 
Responsible-Changed-Why:  
Over to ssh2 maintainer 

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

From: Marius Strobl <marius@alchemy.franken.de>
To: bug-followup@FreeBSD.org, miks@skynet.lv
Cc:  
Subject: Re: amd64/98016: Buffer problem with SSH2 under amd64
Date: Tue, 1 Aug 2006 01:38:05 +0200

 I can't reproduce the exact same problem, that could be due me
 not having root access on an amd64 machine though. However, I
 can reproduce similar problems using ssh2 and sshd2 on amd64
 as non-root. The patch at:
 http://people.freebsd.org/~marius/ssh2.diff
 fixes the issues I have. Could you please try whether it also
 fixes your problem?
 
 Marius
 
 -- 
 This mail was scanned by AntiVir Milter.
 This product is licensed for non-commercial use.
 See www.antivir.de for details.
State-Changed-From-To: open->closed 
State-Changed-By: marius 
State-Changed-When: Mon Aug 28 00:05:06 UTC 2006 
State-Changed-Why:  

Close as the patch mentioned in the Audit-Trail was committed as part 
of ssh2{,-nox11}-3.2.9.1_6. I managed to reproduce the problem noted 
in the Description when running FreeBSD/amd64 in qemu and on native 
ia64 hardware, both times fixed by the mentioned patch so despite the 
lack of test feedback I'm confident it will also fix the problem on 
real amd64 hardware. 
For the records, PR 88746 was a dupe of this one. 

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