Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jul 2018 10:51:19 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        Cy Schubert <Cy.Schubert@cschubert.com>, Alan Somers <asomers@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r336619 - head/lib/libc/gen
Message-ID:  <1532364679.1344.161.camel@freebsd.org>
In-Reply-To: <20180723164115.40C7E948@spqr.komquats.com>
References:  <20180723164115.40C7E948@spqr.komquats.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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
> <Cy.Schubert@cschubert.com> or <cy@freebsd.org>
> 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.

-- 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 <Cy.Schubert@cschubert.
> 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 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1532364679.1344.161.camel>