Skip to content

F-580 zeroed out password field at end of function#230

Open
aidankeefe2022 wants to merge 1 commit into
wolfSSL:mainfrom
aidankeefe2022:fix-password-not-zeroed
Open

F-580 zeroed out password field at end of function#230
aidankeefe2022 wants to merge 1 commit into
wolfSSL:mainfrom
aidankeefe2022:fix-password-not-zeroed

Conversation

@aidankeefe2022
Copy link
Copy Markdown
Member

password field was not zeroed out in the wolfCLU_RSA function before the function returned now it is but calling wolfCLU_ForceZero on the char array.

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #230

Scan targets checked: wolfclu-bugs, wolfclu-src

No new issues found in the changed files. ✅

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the wolfCLU_RSA command implementation to wipe the in-memory password buffer before the function returns, reducing the chance of sensitive data lingering in process memory.

Changes:

  • Zero the password stack buffer via wolfCLU_ForceZero(password, MAX_PASSWORD_SIZE) on the normal function exit path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pkey/clu_rsa.c
Comment on lines +298 to 301
wolfCLU_ForceZero(password, MAX_PASSWORD_SIZE);
wolfSSL_BIO_free(bioIn);
wolfSSL_BIO_free(bioOut);
wolfSSL_RSA_free(rsa);
Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #230

Scan targets checked: wolfclu-bugs, wolfclu-src

No new issues found in the changed files. ✅

@aidankeefe2022
Copy link
Copy Markdown
Member Author

aidankeefe2022 commented May 27, 2026

added zero out code at help function early return case in the wolfCLU_RSA function

@aidankeefe2022 aidankeefe2022 force-pushed the fix-password-not-zeroed branch from 959725d to 7ba7a64 Compare May 27, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants