Skip to content

SLH-DSA fixes#10698

Open
Frauschi wants to merge 1 commit into
wolfSSL:masterfrom
Frauschi:slhdsa_fixes
Open

SLH-DSA fixes#10698
Frauschi wants to merge 1 commit into
wolfSSL:masterfrom
Frauschi:slhdsa_fixes

Conversation

@Frauschi

Copy link
Copy Markdown
Contributor

Zeroization:

  • Add missing ForceZero on the PRF outputs and WOTS+ chain state that hold secret key material.
  • Route the WOTS sign leaf through a temp so secret chain values never touch the public signature buffer.
  • Add SLHDSA_SHAKE_X4_STATE_W so buffer and wipe sizes stay in sync.

Leak / alloc-failure fixes:

  • Fix chain_idx_x4 returning on SAVE_VECTOR_REGISTERS2 failure without freeing state/fixed (memory leak, and the secret was left unzeroized); break to the cleanup path instead.
  • Guard all function-scope wipes with WC_VAR_OK to avoid a NULL deref when an allocation fails under WOLFSSL_SMALL_STACK.

Zeroization:
- Add missing ForceZero on the PRF outputs and WOTS+ chain state that hold
  secret key material.
- Route the WOTS sign leaf through a temp so secret chain values never touch
  the public signature buffer.
- Add SLHDSA_SHAKE_X4_STATE_W so buffer and wipe sizes stay in sync.

Leak / alloc-failure fixes:
- Fix chain_idx_x4 returning on SAVE_VECTOR_REGISTERS2 failure without freeing
  state/fixed (memory leak, and the secret was left unzeroized); break to the
  cleanup path instead.
- Guard all function-scope wipes with WC_VAR_OK to avoid a NULL deref when an
  allocation fails under WOLFSSL_SMALL_STACK.
@Frauschi Frauschi self-assigned this Jun 16, 2026
@Frauschi Frauschi assigned wolfSSL-Bot and unassigned Frauschi Jun 16, 2026
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.

2 participants