BBS:      TELESC.NET.BR
Assunto:  src/ssh/TODO.md src/ssh/enc/aes256-ctr.c src/ssh/kex/curve25519-sha256
De:       Deuc¨
Data:     Mon, 23 Mar 2026 20:49:18 -0700
-----------------------------------------------------------
https://gitlab.synchro.net/main/sbbs/-/commit/521f6864b05d0f311c48a137
Modified Files:
	src/ssh/TODO.md src/ssh/enc/aes256-ctr.c src/ssh/kex/curve25519-sha256.c src/ssh/key_algo/rsa-sha2-256.c ssh-ed25519.c src/ssh/mac/hmac-sha2-256.c src/ssh/test/test_alloc.c
Log Message:
Fix curve25519 OPENSSL_cleanse on NULL; revert incorrect cleanup guards

Bug: curve25519 handler called OPENSSL_cleanse(raw_secret, len) when
raw_secret was NULL (malloc failure).  The NULL check and derive call
were combined in one if-statement, so the malloc failure path fell
through to the cleanse.  Split into separate checks.

Revert: the dead-code guards on module cleanup functions (ed25519,
rsa, aes256-ctr, hmac-sha2-256) assumed cleanup is never called with
a NULL context.  This is false during allocation failure testing --
registration succeeds but keygen/init fails, leaving ctx as NULL when
the global config cleanup runs.  Restore the NULL checks.

Co-Authored-By: Claude Opus 4.6 (1M context) 
n
---
  mSynchronetn  hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net

-----------------------------------------------------------
[Voltar]