From owner-svn-src-head@freebsd.org Mon Jul 23 20:12:14 2018 Return-Path: Delivered-To: svn-src-head@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 35FE01053BAA; Mon, 23 Jul 2018 20:12:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 75E188C74E; Mon, 23 Jul 2018 20:12:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id hhBgfhboxWppDhhBif430z; Mon, 23 Jul 2018 14:12:11 -0600 X-Authority-Analysis: v=2.3 cv=YIcrNiOx c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=R9QF1RCXAYgA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=SLG1KRGDAAAA:8 a=Tq4HStg9fdlw6S220CAA:9 a=-bbj4nsU9_4jBfzN:21 a=OjIXCo247HOtV3fr:21 a=wPNLvfGTeEIA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=-TBaU1e9WpdkKBzYXnwo:22 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTPS id CAA2DAE2; Mon, 23 Jul 2018 13:12:13 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id w6NKBqcU050309; Mon, 23 Jul 2018 13:11:52 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id w6NKBqgT050306; Mon, 23 Jul 2018 13:11:52 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201807232011.w6NKBqgT050306@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Ian Lepore cc: Cy Schubert , Alan Somers , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r336619 - head/lib/libc/gen In-Reply-To: Message from Ian Lepore of "Mon, 23 Jul 2018 10:51:19 -0600." <1532364679.1344.161.camel@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Mon, 23 Jul 2018 13:11:52 -0700 X-CMAE-Envelope: MS4wfJlUApib6/nhcE0BL0ck04rGeIQLdO7hojKmFmAD/F/cNJP1GAGLtV37yie8FM7hN+XYxvPdP/LvG6HIZ47BuLZRQMfTP4ctHgGXYNja6z0+oSWxByGx db2skofcDtPDxqmkS7siXiKwU+pUjldxX9HltxjXbNIJm4WIInEOd8EzT35qOhV1Awpf32eEZ+1d223PIkbCzHlVgJ9Ue++SSJhbERhMkfTJ4FyIOPpeFxPX Ca7J8ojABOYqFjcLtXxRrRPj4ynvQUC4R5Mt4LMYnt1ZCgIwQ1DT3dFnF0UcmvYhIicc/7A4GqevGdP6ST2oj7x4dd3SUEEECWreIHsbj7Q= X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jul 2018 20:12:14 -0000 In message <1532364679.1344.161.camel@freebsd.org>, Ian Lepore writes: > On Mon, 2018-07-23 at 09:41 -0700, Cy Schubert wrote: > > I'm sure. Rolling this libc commit back addressed the ssh segfaults > > on all my systems. > > > > --- > > Sent using a tiny phone keyboard. > > Apologies for any typos and autocorrect. > > Also, this old phone only supports top post. Apologies. > > > > Cy Schubert > > or > > The need of the many outweighs the greed of the few. > > --- > > > > My current working theory is that some of the software that uses > __pw_scan() pre-stages a pointer-to-empty-string into the pw_class > field and my change ruined that by replacing it with a NULL pointer. > Other callers of __pw_scan() don't do that, they just assume they're > running as root and will get all the fields populated. Yes. A simple check for pw->pw_class != NULL should fix this instance. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. > > -- Ian > > > -----Original Message----- > > From: Alan Somers > > Sent: 23/07/2018 07:48 > > To: Cy Schubert > > Cc: Ian Lepore; src-committers; svn-src-all@freebsd.org; svn-src-head > > @freebsd.org > > Subject: Re: svn commit: r336619 - head/lib/libc/gen > > > > > > > > On Sun, Jul 22, 2018 at 11:13 PM, Cy Schubert > com> wrote: > > > > In message <201807222234.w6MMYKpn030237@repo.freebsd.org>, Ian > > Lepore  > > writes: > >   > > > > > > > > Author: ian > >  > Date: Sun Jul 22 22:34:20 2018 > >  > New Revision: 336619 > >  > URL: https://svnweb.freebsd.org/changeset/base/336619 > >  > > >  > Log: > >  >   Set the pw_class field to NULL when scanning the non-master > > passwd file. > >  >   This avoids a null pointer deref in pw_dup(), which assumes that > > all > >  >   pointers are either NULL or valid. > >  > > >  > Modified: > >  >   head/lib/libc/gen/pw_scan.c > >  > > > > >   > > Hi Ian, > >   > > This causes ssh a bit of gas. > >   > > > > > > > > > > Are you sure, Cy?  Judging by the Jenkins output, I think it was the > > next revision to pw (336625) that broke everything.  https://ci.freeb > > sd.org/job/FreeBSD-head-amd64-test/8320/ . > > > > > > > > > > -Alan  >