From owner-freebsd-current@freebsd.org Tue Oct 9 19:18:10 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A92F410B9184 for ; Tue, 9 Oct 2018 19:18:10 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 48802782A6; Tue, 9 Oct 2018 19:18:10 +0000 (UTC) (envelope-from des@des.no) Received: from next.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id B36F785AB; Tue, 9 Oct 2018 19:18:09 +0000 (UTC) Received: by next.des.no (Postfix, from userid 1001) id CEFAFB6E9; Tue, 9 Oct 2018 21:18:09 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Michael Butler Cc: Marek Zarychta , emaste@freebsd.org, FreeBSD Current Subject: Re: SVN r339216 breaks ssh to i386 devices In-Reply-To: <375ebc04-82a3-6497-ad60-5afee1088f0a@protected-networks.net> (Michael Butler's message of "Tue, 9 Oct 2018 13:46:10 -0400") References: <6bd10ee9-eb03-1f9f-c533-fdb5d02eb829@protected-networks.net> <20181008190846.GA84941@plan-b.pwste.edu.pl> <86tvlwcee0.fsf@next.des.no> <86lg78c92o.fsf@next.des.no> <1e8f80dd-d7c9-e82c-987f-f84c4103a039@plan-b.pwste.edu.pl> <375ebc04-82a3-6497-ad60-5afee1088f0a@protected-networks.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix) Date: Tue, 09 Oct 2018 21:18:09 +0200 Message-ID: <86bm839bf2.fsf@next.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 19:18:10 -0000 Michael Butler writes: > Marek Zarychta writes: > > I have connected serial console to affected box and upgraded system > > from patched sources. I am sorry to say that this patch doesn't > > solve the issue for 32-bit ARM (RPi2). Still sshd terminates session > > with the error "fatal: mm_getpwnamallow: receive get struct passwd > > failed [preauth]". > My experience is similar - there maybe another 32/64-bit issue :-( Correct, there is a size_t being passed as as an u64 as well. That explains why arm32 was broken too, and not just i386. The quick fix is to replace size_t with u_int64_t in sshbuf_get_passwd(), on line 513 of sshbuf-getput-basic.c (with my previous patch applied). I have a full patch in the pipeline. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no