openwall / openwall/john

descrypt-opencl per-salt kernels optimization 4096 limit is not working properly

Open
#2,660 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
13.6k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

I created the test case for i in `seq 1 95000`; do mkpasswd -m des asd$i; done > ~/testdes.in

#0  0x000000000079dc64 in create_tables (htype=<value optimized out>, loaded_hashes_ptr=<value optimized out>, 
    num_ld_hashes=<value optimized out>, offset_table_ptr=0x7fffffffa090, offset_table_sz_ptr=0x7fffffffa098, 
    hash_table_sz_ptr=0x7fffffffa09c, verb=0) at bt.c:474
#1  create_perfect_hash_table (htype=<value optimized out>, loaded_hashes_ptr=<value optimized out>, num_ld_hashes=<value optimized out>, 
    offset_table_ptr=0x7fffffffa090, offset_table_sz_ptr=0x7fffffffa098, hash_table_sz_ptr=0x7fffffffa09c, verb=0) at bt.c:696
#2  0x0000000000611192 in fill_buffer (salt=<value optimized out>, max_uncracked_hashes=<value optimized out>, max_hash_table_size=0xd1eb04)
    at opencl_DES_bs_plug.c:224
#3  0x0000000000611752 in build_tables (db=<value optimized out>) at opencl_DES_bs_plug.c:423
#4  0x000000000060ca3d in reset (db=0xd64600) at opencl_DES_bs_h_plug.c:667
#5  0x000000000074aee5 in john_run () at john.c:1710
#6  0x000000000074b785 in main (argc=8, argv=0x7fffffffe398) at john.c:1996

See #2655.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided mkpasswd loop and inspect the stack trace through bt.c:create_tables and create_perfect_hash_table, then opencl_DES_bs_plug.c:fill_buffer/build_tables and opencl_DES_bs_h_plug.c:reset. Compare the behavior with issue #2655 and verify that the 4096-limit handling works correctly for the 95,000 generated DES hashes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
performance, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.