Zero scrypt scratch buffers before freeing#416
Open
gperciva wants to merge 1 commit into
Open
Conversation
Member
Author
|
This is #414, but I've added the bug reporter's name and (probable) bounty, as per our usual practice. |
cperciva
reviewed
Jul 18, 2026
| #else | ||
| free(V0); | ||
| #endif | ||
| insecure_memzero(XY, 256 * r + 64); |
Member
There was a problem hiding this comment.
If you move these two insecure_memzero calls above the #if then we don't need them in the error path.
cperciva
reviewed
Jul 18, 2026
| return (0); | ||
|
|
||
| err2: | ||
| insecure_memzero(XY, 256 * r); |
Member
There was a problem hiding this comment.
Not needed here; it's impossible to reach err2 after writing to these buffers.
Member
Author
|
Whoops, I should have caught that. Added a REBASE commit, and moved the clearing into a separate |
Member
|
I would s/clear buffers/sanitize memory/ but I'm fine with either spelling. Please rebase. |
gperciva
force-pushed
the
zero-scrypt-buffers
branch
from
July 19, 2026 02:13
5b096cf to
c7d87b0
Compare
Reported by: ChronoNova
Bug bounty: $10 ("harmless")
Member
Author
|
Rebased, along with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.