Skip to content

NULL the correct key in TLSX_KeyShare_ProcessPqcHybridClient when using WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ.#10493

Merged
dgarske merged 1 commit into
wolfSSL:masterfrom
kareem-wolfssl:zd21852
May 18, 2026
Merged

NULL the correct key in TLSX_KeyShare_ProcessPqcHybridClient when using WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ.#10493
dgarske merged 1 commit into
wolfSSL:masterfrom
kareem-wolfssl:zd21852

Conversation

@kareem-wolfssl
Copy link
Copy Markdown
Contributor

Description

Fixes zd#21852

Testing

Provided reproducer + built in tests

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

…ng WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ.

Thanks to Haiyang Huang for the report.
@kareem-wolfssl kareem-wolfssl self-assigned this May 18, 2026
Copilot AI review requested due to automatic review settings May 18, 2026 17:25
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

Fixes an async-cleanup bug in the TLS 1.3 PQC-hybrid (ECC + ML-KEM) client key-share processing when WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ is enabled, ensuring the correct ML-KEM private-key pointer is nulled to avoid being freed while the operation is pending.

Changes:

  • In the WC_PENDING_E path, conditionally nulls pqc_kse->key (object-storage mode) instead of pqc_kse->privKey (byte-storage mode).
  • Preserves existing behavior for non-WOLFSSL_TLSX_PQC_MLKEM_STORE_OBJ builds.

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

@github-actions
Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@Frauschi Frauschi removed their assignment May 18, 2026
@dgarske dgarske merged commit 064ebaa into wolfSSL:master May 18, 2026
447 of 448 checks passed
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.

5 participants