mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-08 14:51:10 +00:00
Fix out-of-boundary reads in -m 24800 pure kernels
This commit is contained in:
parent
a834574daf
commit
dc79983bc9
@ -52,9 +52,9 @@ KERNEL_FQ void m24800_mxx (KERN_ATTR_RULES ())
|
||||
u32 t[128] = { 0 };
|
||||
|
||||
// make it unicode.
|
||||
for (u32 i = 0, idx = 0; idx < tmp.pw_len; i += 2, idx += 1)
|
||||
for (u32 i = 0, idx = 0; i < tmp.pw_len; i += 4, idx += 1)
|
||||
{
|
||||
make_utf16beN (&tmp.i[idx], &t[i], &t[i+1]);
|
||||
make_utf16beN (&tmp.i[idx], &t[(idx * 2) + 0], &t[(idx * 2) + 1]);
|
||||
}
|
||||
|
||||
// hash time
|
||||
@ -123,9 +123,9 @@ KERNEL_FQ void m24800_sxx (KERN_ATTR_RULES ())
|
||||
u32 t[128] = { 0 };
|
||||
|
||||
// make it unicode.
|
||||
for (u32 i = 0, idx = 0; idx < tmp.pw_len; i += 2, idx += 1)
|
||||
for (u32 i = 0, idx = 0; i < tmp.pw_len; i += 4, idx += 1)
|
||||
{
|
||||
make_utf16beN (&tmp.i[idx], &t[i], &t[i+1]);
|
||||
make_utf16beN (&tmp.i[idx], &t[(idx * 2) + 0], &t[(idx * 2) + 1]);
|
||||
}
|
||||
|
||||
// hash time
|
||||
|
@ -69,9 +69,9 @@ KERNEL_FQ void m24800_mxx (KERN_ATTR_BASIC ())
|
||||
u32 t[128] = { 0 };
|
||||
|
||||
// make it unicode.
|
||||
for (u32 i = 0, idx = 0; idx < pw_len + comb_len; i += 2, idx += 1)
|
||||
for (u32 i = 0, idx = 0; i < pw_len + comb_len; i += 4, idx += 1)
|
||||
{
|
||||
make_utf16beN (&c[idx], &t[i], &t[i+1]);
|
||||
make_utf16beN (&c[idx], &t[(idx * 2) + 0], &t[(idx * 2) + 1]);
|
||||
}
|
||||
|
||||
sha1_hmac_ctx_t ctx;
|
||||
@ -158,9 +158,9 @@ KERNEL_FQ void m24800_sxx (KERN_ATTR_BASIC ())
|
||||
u32 t[128] = { 0 };
|
||||
|
||||
// make it unicode.
|
||||
for (u32 i = 0, idx = 0; idx < pw_len + comb_len; i += 2, idx += 1)
|
||||
for (u32 i = 0, idx = 0; i < pw_len + comb_len; i += 4, idx += 1)
|
||||
{
|
||||
make_utf16beN (&c[idx], &t[i], &t[i+1]);
|
||||
make_utf16beN (&c[idx], &t[(idx * 2) + 0], &t[(idx * 2) + 1]);
|
||||
}
|
||||
|
||||
sha1_hmac_ctx_t ctx;
|
||||
|
@ -54,9 +54,10 @@ KERNEL_FQ void m24800_mxx (KERN_ATTR_VECTOR ())
|
||||
|
||||
u32x t[128] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; idx < pw_len; i += 2, idx += 1)
|
||||
// make it unicode.
|
||||
for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1)
|
||||
{
|
||||
make_utf16beN (&w[idx], &t[i + 0], &t[i + 1]);
|
||||
make_utf16beN (&w[idx], &t[(idx * 2) + 0], &t[(idx * 2) + 1]);
|
||||
}
|
||||
|
||||
sha1_hmac_ctx_vector_t ctx;
|
||||
@ -128,9 +129,10 @@ KERNEL_FQ void m24800_sxx (KERN_ATTR_VECTOR ())
|
||||
|
||||
u32x t[128] = { 0 };
|
||||
|
||||
for (u32 i = 0, idx = 0; idx < pw_len; i += 2, idx += 1)
|
||||
// make it unicode.
|
||||
for (u32 i = 0, idx = 0; i < pw_len; i += 4, idx += 1)
|
||||
{
|
||||
make_utf16beN (&w[idx], &t[i + 0], &t[i + 1]);
|
||||
make_utf16beN (&w[idx], &t[(idx * 2) + 0], &t[(idx * 2) + 1]);
|
||||
}
|
||||
|
||||
sha1_hmac_ctx_vector_t ctx;
|
||||
|
Loading…
Reference in New Issue
Block a user