Skip to content

Fix PKCS7 verify content memleak#3036

Merged
WillChilds-Klein merged 3 commits intoaws:mainfrom
WillChilds-Klein:pkcs7-content-leak
Feb 25, 2026
Merged

Fix PKCS7 verify content memleak#3036
WillChilds-Klein merged 3 commits intoaws:mainfrom
WillChilds-Klein:pkcs7-content-leak

Conversation

@WillChilds-Klein
Copy link
Copy Markdown
Contributor

@WillChilds-Klein WillChilds-Klein commented Feb 24, 2026

Notes

Previously we failed to free the whole BIO chain in PKCS7_verify, instead just popping the head. To remediate, we need to iterate through the chain until we hit indata (owned by the caller), freeing as we go.

Testing

  • new test triggering the memory leak, confirmed fix.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.35%. Comparing base (110f184) to head (e641081).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3036      +/-   ##
==========================================
+ Coverage   78.31%   78.35%   +0.03%     
==========================================
  Files         689      689              
  Lines      120995   121035      +40     
  Branches    16971    16991      +20     
==========================================
+ Hits        94758    94831      +73     
+ Misses      25341    25307      -34     
- Partials      896      897       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@WillChilds-Klein WillChilds-Klein enabled auto-merge (squash) February 25, 2026 22:42
@WillChilds-Klein WillChilds-Klein merged commit 04e7dc0 into aws:main Feb 25, 2026
470 of 475 checks passed
@WillChilds-Klein WillChilds-Klein deleted the pkcs7-content-leak branch February 25, 2026 22:47
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