Skip to content

PKCS#7 fixes#10203

Open
Frauschi wants to merge 8 commits intowolfSSL:masterfrom
Frauschi:pkcs7_fixes
Open

PKCS#7 fixes#10203
Frauschi wants to merge 8 commits intowolfSSL:masterfrom
Frauschi:pkcs7_fixes

Conversation

@Frauschi
Copy link
Copy Markdown
Contributor

Fixes for various issues found in PKCS#7 code.

Fixes zd21593, F-2683, F-2684, F-2686, F-1552, F-1990, F-2681, F-2685, F-1991, F-1992, F-2679, F-2680. Also fixes a regression when building with --enable-all and NO_PKCS7_STREAM.

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 #10203

Scan targets checked: wolfcrypt-api_misuse, wolfcrypt-bugs, wolfcrypt-compliance, wolfcrypt-concurrency, wolfcrypt-consttime, wolfcrypt-defaults, wolfcrypt-mutation, wolfcrypt-portability, wolfcrypt-proptest, wolfcrypt-src, wolfcrypt-zeroize

Findings: 5
5 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c
@Frauschi Frauschi self-assigned this Apr 13, 2026
@Frauschi Frauschi force-pushed the pkcs7_fixes branch 2 times, most recently from 52b6384 to f381fda Compare April 14, 2026 16:10
@Frauschi
Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 15, 2026

MemBrowse Memory Report

No memory changes detected for:

@Frauschi Frauschi force-pushed the pkcs7_fixes branch 2 times, most recently from 5e42078 to 14c9823 Compare April 16, 2026 15:41
@Frauschi
Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

@Frauschi Frauschi assigned wolfSSL-Bot and unassigned Frauschi Apr 16, 2026
Comment thread wolfcrypt/src/pkcs7.c

/* free any buffers that may be allocated */
if (pkcs7->stream->aad != NULL && pkcs7->stream->aadSz > 0)
ForceZero(pkcs7->stream->aad, pkcs7->stream->aadSz);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we are adding ForceZeros then we should put in wc_MemZero_Add calls in constructor.
If memory is dynamic then it will be checked in the free, otherwise you need a wc_MemZero_Check() in the destructor.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where were they added.
Thanks.

Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c Outdated
Comment thread wolfcrypt/src/pkcs7.c Outdated
Comment thread wolfcrypt/src/pkcs7.c Outdated
Comment thread wolfcrypt/src/pkcs7.c
Comment thread wolfcrypt/src/pkcs7.c Outdated
@Frauschi Frauschi force-pushed the pkcs7_fixes branch 2 times, most recently from 5829b06 to 9959856 Compare April 17, 2026 18:34
@Frauschi Frauschi removed their assignment Apr 20, 2026
@Frauschi Frauschi requested a review from SparkiDev April 20, 2026 15:00
Comment thread wolfcrypt/src/pkcs7.c

/* free any buffers that may be allocated */
if (pkcs7->stream->aad != NULL && pkcs7->stream->aadSz > 0)
ForceZero(pkcs7->stream->aad, pkcs7->stream->aadSz);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Where were they added.
Thanks.

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