Skip to content

shim: fix a memory leak on eku verification - #832

Open
vathpela wants to merge 1 commit into
rhboot:mainfrom
vathpela:eku_memory_leak
Open

vathpela wants to merge 1 commit into
rhboot:mainfrom
vathpela:eku_memory_leak

Conversation

@vathpela

Copy link
Copy Markdown
Member

Currently if we find the MODSIGN eku on a cert, we return that the cert can't be used, but in doing so we leak the parsed certificate objects from OpenSSL. They get cleaned up when our arena is freed, of course, but it's still wrong.

This fixes it to free them before returning.

Currently if we find the MODSIGN eku on a cert, we return that the cert
can't be used, but in doing so we leak the parsed certificate objects
from OpenSSL.  They get cleaned up when our arena is freed, of course,
but it's still wrong.

This fixes it to free them before returning.

Signed-off-by: Peter Jones <pjones@redhat.com>
@vathpela vathpela added this to the shim 17 milestone Oct 15, 2026
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.96%. Comparing base (4dc4a1b) to head (cf8c3ed).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #832   +/-   ##
=======================================
  Coverage   58.96%   58.96%           
=======================================
  Files          24       24           
  Lines        4223     4223           
  Branches      654      654           
=======================================
  Hits         2490     2490           
  Misses       1462     1462           
  Partials      271      271           

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant