openwall / openwall/john

memory leak in hybrid rexgen mode

Open
#3,385 3 comments 0 reactions 1 assignee View on GitHub

@jfoug is already working on this.

Since Aug 21, 2018.

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

Description

It seems that I found memory leak within rexgen mode. It happens with salted hashes with high number of salts. --fork does not affect it. Regular rexgen with similar number of candidates seems to be ok.

Amount of memory used goes up and down, but it goes only up at the scale of minutes. It ate 0.5 Gb after 1 minute, 1 Gb after 3 minutes, 2+ Gb after 7 minutes.

rexgen was installed from https://github.com/teeshop/rexgen.git . There was src/patches/john-1.8.0-regex.patch, it was not applied.

Steps to reproduce
$ python -c 'for i in range(300000): print "$dynamic_1${:06d}{:026d}${:032d}".format(i, 0, i)' > t.pw
$ seq 256 > t.lst
$ john --regex='\){2,3}\0[12A\)]{0,4}' --wordlist=t.lst t.pw
[...]
System configuration
$ john --list=build-info
Version: 1.8.0.13-jumbo-1-bleeding-5d6ec13 2018-08-07 22:30:42 +0530
Build: linux-gnu 64-bit x86_64 SSE4.2 AC
SIMD: SSE4.1, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
CPU tests: SSE4.2
[...]
gcc version: 5.1.0
GNU libc version: 2.19 (loaded: 2.19)
Crypto library: OpenSSL
OpenSSL library version: 01000114f
OpenSSL 1.0.1t  3 May 2016
GMP library version: 6.0.0
Regex library version: 2.0	(loaded: 2.0.8)
File locking: fcntl()
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's

rexgen$ git log | head -n 3
commit b8cd7b433a1a4c665bc1ca1d33146996d57b33fd
Author: Jan Starke <jan.starke@t-systems.com>
Date:   Mon Mar 5 11:42:53 2018 +0100

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.