svn commit: r336619 - head/lib/libc/gen

Cy Schubert Cy.Schubert at cschubert.com
Mon Jul 23 20:12:14 UTC 2018


In message <1532364679.1344.161.camel at 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
> > <Cy.Schubert at cschubert.com> or <cy at 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.

Yes. A simple check for pw->pw_class != NULL should fix this instance.


-- 
Cheers,
Cy Schubert <Cy.Schubert at cschubert.com>
FreeBSD UNIX:  <cy at FreeBSD.org>   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 at 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 at cschubert.
> > com> wrote:
> > 
> > In message <201807222234.w6MMYKpn030237 at 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 
>




More information about the svn-src-all mailing list