[2812] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

krb5-libs/492: Kerberos 5 DES library not _quite_ 64-bit safe

daemon@ATHENA.MIT.EDU (Ken Hornstein)
Fri Nov 7 18:21:18 1997

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: krb5-unassigned@RT-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, kenh@cmf.nrl.navy.mil
Date: Fri, 7 Nov 1997 18:20:02 -0500 (EST)
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Reply-To: kenh@cmf.nrl.navy.mil
To: krb5-bugs@MIT.EDU


>Number:         492
>Category:       krb5-libs
>Synopsis:       The DES library still makes a 32-bit integer assumption
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    krb5-unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Fri Nov 07 18:21:01 EST 1997
>Last-Modified:
>Originator:     Ken Hornstein
>Organization:
Navel Research Laboratory
	
>Release:        1.0pl1
>Environment:
	
System: SunOS elvis 4.1.4 6 sun4c
Architecture: sun4

>Description:
	
Even though many 64-bit problems were fixed in the DES library, one
nasty one still remains.

mit_des_init_random_key() assumes that a structure containing two
krb5_int32s (struct tval) will fit into 64 bits.  This breaks when this
is done:

(void) krb5_crypto_us_timeofday(&timenow.seconds,
				&timenow.microseconds);
memcpy((char *)p_state->sequence.data, (char *)&timenow, sizeof(timenow));

And since sequence.data is only 8 bytes ....

>How-To-Repeat:

Try porting V5 to the Cray :-)
	
>Fix:
	
Not quite sure ... one possibility is to make "struct tval" use bitfields ..
>Audit-Trail:
>Unformatted:

home help back first fref pref prev next nref lref last post