2.9p1?? core dump in auth_log

Markus Friedl markus.friedl at informatik.uni-erlangen.de
Thu May 3 06:50:12 EST 2001


On Wed, May 02, 2001 at 12:20:49PM -0700, Carson Gaspar wrote:
> If authctxt->user is null, this will dump core.

how can ->user be NULL?

authentication packets w/o a user are illegal and
should trigger other error messages.

> I discovered this using 
> SSH1 publickey auth with my hacked 20010424 CVS sources. auth.c and auth1.c 
> haven't changed since then, so I suspect this may still be lurking. I'm 
> going to test it against 2.9p1 as soon as I can, but I have to run off to 
> jury duty now (feh).
> 
> A local patch is to change the marked line above to:
> 
> authctxt->valid ? (authctxt->pw->pw_uid == 0 ? "ROOT" : authctxt->user) : 
> "unknown user",
> 
> A larger issue is why getpwnam() hasn't been called by that point...

if getpwnam is successfull then
	authctxt->valid
is true.

authctxt->user
should always be set from the ssh messages.



More information about the openssh-unix-dev mailing list