openwall / john

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
https://www.openwall.com/john/
Other
10.29k stars 2.1k forks source link

Alleged bug in pot sync #1573

Closed magnumripper closed 9 years ago

magnumripper commented 9 years ago

Got report OOB (and via Solar).

I have found a bug that may be more of a 'class of bug' in JtR.

_Specifically, LMfmt defines 'split' to return a static buffer. At at least one point, that static buffer is returned into a variable, and then split is later called, and the result stored into a second variable. It is unfortunately expected to compare these two variables, but since they are a static buffer, the comparison is always the same.

_Specifically, this affects crk_reload_pot() (which calls split) and crk_remove_potentry() (which also calls split, via LM's 'source').

_This was affecting my cracking because on windows anyway, crk_reloadpot gets called by the simulated timer during normal operation on a regular basis. As soon as that happened, it would actually stop cracking because the 'remove hash' stuff would always remove all the remaining hashes.

I also got a patch that look solid. I will commit that very soon but first I'll try to reproduce - I can't believe this never showed up in my very extensive testing.

magnumripper commented 9 years ago

I decided to commit a different fix, the original patch used alloc/free.