From nobody@FreeBSD.org  Tue Aug 21 21:22:32 2007
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 898BB16A419
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Aug 2007 21:22:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 78CCC13C467
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Aug 2007 21:22:32 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l7LLMVEY082708
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 21 Aug 2007 21:22:31 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l7LLMVxt082706;
	Tue, 21 Aug 2007 21:22:31 GMT
	(envelope-from nobody)
Message-Id: <200708212122.l7LLMVxt082706@www.freebsd.org>
Date: Tue, 21 Aug 2007 21:22:31 GMT
From: David EVans <d@AndD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: When "device padlock" defined first ssh to machine gives "Disconnecting: Bad packet length".
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         115695
>Category:       kern
>Synopsis:       [crypto] When "device padlock" defined first ssh to machine gives "Disconnecting: Bad packet length".
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 21 21:30:02 GMT 2007
>Closed-Date:    Fri Nov 02 22:18:55 UTC 2012
>Last-Modified:  Fri Nov 02 22:18:55 UTC 2012
>Originator:     David EVans
>Release:        6.2
>Organization:
Home
>Environment:
FreeBSD router.aandd.org 6.2-RELEASE FreeBSD 6.2-RELEASE #9: Tue Aug 21 20:21:09 PDT 2007     root@router.aandd.org:/var/usr/obj/var/usr/src/sys/ROUTER  i386
>Description:
On a Jetway J7F2WE-1G5 (this uses the Via C7 CPU).

When I add:

device      padlock
device      crypto
device      cryptodev

to the kernel and reboot with a new kernel the first connection results
in a disconnect after the password is entered. The message is similar to:

Disconnecting: Bad packet length 191787477

with different values after each reboot for the length.
All subsequent SSH connections work. ssh'ing out has no problems.

Since this is a home router I'm building I can run any tests or rebuild
things as needed if anybody lets me know what I should look for.
>How-To-Repeat:
No idea if you don't have the same motherboard.
>Fix:
Remove the three device entries from the kernel, rebuild and install the
kernel without the devices.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Sep 17 03:38:41 UTC 2007 
Responsible-Changed-Why:  
This does not sound i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115695 
State-Changed-From-To: open->feedback 
State-Changed-By: jh 
State-Changed-When: Fri Mar 4 15:55:54 UTC 2011 
State-Changed-Why:  
Can you still reproduce this on a supported release? 

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

From: Patrick Lamaiziere <patfbsd@davenulle.org>
To: bug-followup@FreeBSD.org <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: kern/115695: [crypto] When "device padlock" defined first ssh
 to machine gives "Disconnecting: Bad packet length".
Date: Fri, 4 Mar 2011 18:35:49 +0100

 Le Fri, 4 Mar 2011 15:55:54 GMT,
 jh@FreeBSD.org a crit :
 
 Hello,
 
 > Can you still reproduce this on a supported release?
 
 That should be fixed on FreeBSD >= 8.0 by :
 http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/crypto/via/padlock.c#rev1.16
 
 There was a discussion on current@ on this topic:
 http://old.nabble.com/Recent-Padlock-changes-break-ssh-td18582674.html  
 
 But this fix was never mfced to FreeBSD 7.
 
 Regards.
State-Changed-From-To: feedback->patched 
State-Changed-By: jh 
State-Changed-When: Thu Apr 21 19:03:53 UTC 2011 
State-Changed-Why:  
Reportedly fixed in head and stable/8. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=115695 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Fri Nov 2 22:18:54 UTC 2012 
State-Changed-Why:  
MFCed/fixed by now 

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