[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Security impact of removing timestamp check in rd_rep()

I've been working on the DCE_STYLE GSSAPI code (mostly by metze) that
Samba4 needs for the 'Kerberos domain join' problem, and I have solved
the final piece of the puzzle.  

It appears that the encrypted timestamp in the AP_REP (mutual
authentication) packet, used in the '3rd leg' of the extended GSSAPI
negotiation is not consistent with the other two timestamps in the
exchange.  It appears simply to be the real time, on the client now, and
so varies particularly in the usec field.

So, what I'm wondering is how to still be secure, while removing the
need for an exact timestamp match here.  

To be clear about the packets I'm talking about, I have attached the #if
0 patch I used.

Andrew Bartlett
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Student Network Administrator, Hawker College  http://hawkerc.net
Index: lib/krb5/rd_rep.c
--- lib/krb5/rd_rep.c	(revision 282)
+++ lib/krb5/rd_rep.c	(working copy)
@@ -89,13 +89,16 @@
   if (ret)
       return ret;
+#if 0  
   if ((*repl)->ctime != auth_context->authenticator->ctime ||
       (*repl)->cusec != auth_context->authenticator->cusec) {
-    krb5_clear_error_string (context);
+    krb5_set_error_string (context, "Mutual authentication failed: Timestamps mismatch");
     goto out;
   if ((*repl)->seq_number)
       krb5_auth_con_setremoteseqnumber(context, auth_context,

This is a digitally signed message part