[krbdev.mit.edu #1714] starttime marshalling bug on 64bit platforms in krb524d
Cesar Garcia via RT
rt-comment at krbdev.mit.edu
Wed Aug 6 13:09:06 EDT 2003
krb524d uses krb524int_krb_create_ticket(), which when it populates
the K4 ticket starttime in the tkt->dat, is using memcpy to copy 4
from an 8 byte long (8 bytes on 64bit platforms).
The result is a starttime of zero, rather than the actual start time
which is held in the lower order bytes (assuming big endian).
marshalling the 64bit starttime is implemented in krb_create_ticket
(src/lib/krb4/cr_tkt.c), but appears to have been overlooked in
krb524int_krb_create_ticket (src/krb524/cnv_tkt_skey.c).
Attached is a patch to 1.3.1 for your review. I've tested this on:
* 64bit solaris 8 (big endian)
* 32bit solaris 8 (big endian)
* 32bit red hat linux AS 2.1 (little endian)
However the krb_create_ticket code assumes big endian, so this patch
is an adaptation of the changes made to krb_create_ticket. I'm not
aware of any predefined macros that can be used to determine
endianness, but the intent of this patch should be clear.
Regards,
Cesar
More information about the krb5-bugs
mailing list