Dynamic: Bug in Base64 handling
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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