In message <1532364679.1344.161.ca...@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.schub...@cschubert.com> or <c...@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.schub...@cschubert.com>
FreeBSD UNIX:  <c...@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-...@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.w6mmykpn030...@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 
>


_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to