openwall / openwall/john

Dynamic: Bug in Base64 handling

Open
#4,860 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

From @jfoug in https://github.com/openwall/john/issues/4845#issuecomment-955608090:
I did find a 'bug' in dynamic, where the binary with trailing '=' is removed (normalized) in prepare() and split(), BUT when the offset in the input string computes the offset to the salt, the trailing '=' was used. So when the binaries using the trailing '=' were used, the salt used within runtime started with "G4DAgeAA.." and not "MG4DAgeAA.." which is the proper salt.

This is a bad bug: It means false negatives.

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

Start by tracing dynamic's prepare() and split() handling of binaries with trailing '=' and then follow how the input offset is used to locate the salt. Confirm that normalized trailing '=' handling produces the correct salt beginning with "MG4DAgeAA.." and no false negatives.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.