Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 8 Sep 2012 18:36:00 +0530
From: Dhiru Kholia <dhiru.kholia@...il.com>
To: john-dev@...ts.openwall.com
Subject: Re: New formats: KRB5-18 and KRB5-23

On Sat, Sep 8, 2012 at 6:21 PM, Dhiru Kholia <dhiru.kholia@...il.com> wrote:
> On Sat, Sep 8, 2012 at 6:17 PM, magnum <john.magnum@...hmail.com> wrote:
>> That looks correct to me. Is there something similar in krb5-23?
>
> I will take a look today.

Patch for krb5-23. Linux OMP works fine now.

diff --git a/src/krb5-23_fmt.c b/src/krb5-23_fmt.c
index c0d239d..ab03d03 100644
--- a/src/krb5-23_fmt.c
+++ b/src/krb5-23_fmt.c
@@ -66,9 +66,6 @@ static struct fmt_tests kinit_tests[] = {
 static char (*saved_key)[PLAINTEXT_LENGTH + 1];
 static ARCH_WORD_32 (*crypt_out)[8];

-static krb5_error_code ret;
-static krb5_data string;
-static krb5_keyblock key;
 static krb5_data salt;
 static krb5_enctype enctype;

@@ -158,16 +155,18 @@ static void crypt_all(int count)
   for (index = 0; index < count; index++)
 #endif
     {
+      krb5_data string;
+      krb5_keyblock key;

       string.data = saved_key[index];
       string.length = strlen(saved_key[index]);
-      ret = krb5_c_string_to_key_with_params(NULL,
+      krb5_c_string_to_key_with_params(NULL,
                                             enctype,
                                             &string,
                                             &salt,
                                             NULL,
                                             &key);
-      for(; i < key.length / 4; i++){
+      for(i=0; i < key.length / 4; i++){
              crypt_out[index][i] = (key.contents[4 * i]) |
                      (key.contents[4 * i + 1] << 8) |
                      (key.contents[4 * i + 2] << 16) |


The problem was that 'i' was not getting reset to 0.

-- 
Cheers,
Dhiru

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.