Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 1995 03:28:10 -0400 (EDT)
From:      Rashid Karimov <rashid@rk.ios.com>
To:        hackers@freebsd.org
Subject:   DES crypt() in FreeBSD2.1*  - bug or feature ?
Message-ID:  <199510130728.DAA05466@rk.ios.com>

next in thread | raw e-mail | index | archive | help
		Hi there folx,


	This is the finale of the former thread here under 
	"ANNEX'es erpcd ***" subj..
	Those ones who followed and/or were interested know
	that erpcd compiled for FreeBSD caused huge load
	averages for the server for some weird reason. It
	didn't authetificate certain accounts off the acp_passwd
	file and erpcd processes were in some kind of endless
	loop in crypt() (DES) with 50-90% of CPU consumption (top).

	So I tried to recreate the problem .. and here is what I've find out:


	on certain combinations of parameters crypt() _dies - it never
	returns from the call ( probably it does - in an hour or two,
	I didn't have much time to wait ;).
	while _the same params on SStation work just fine !

	For example:

	 crypt("YBS889j","_2UzF.mC29OQ."); 
	 doesn't work on FreeBSD ( tried both PERL 5.001 and small C program)
	 and does work on SS ( returns back second parameter in the way it
	 should).

	 So what happens with erpcd is it forks the processes for each
	 authentification request and those ones who aren't lucky with 
	 parameters for crypt() won't end , consuming more and more
	 proc slots , which will lead to huge load averages on busy
	 systems ( I have ~20.000 entries in acp_passwd file).
	 It will authetificate though certain users .. weird ...

	 The acp_password file I use was ftp'ed from SStation under SunOS
	 414. They both run DES .
	 I've tried to import passwords into regular /etc/master.passwd - 
	 just for the heck of it - and it does work !

	 I've checked out the libdes* - they are intact and apparently
	 the right ones. The symlinks ( libcrypt*) are corret as well.

	 So ... even if there is a screw up from my side - why does
	 crypt() die in that loop ? I would be much more happy with NULL as 
	 return value ...
	 Is this really a bug ? What could be possibly wrong from my side ?


	 Rashid



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