Commit 162dd7f
Test ForceZero of secrets in free and DH KEX
- Add retain-on-free and size-tracking capture allocators to inspect
freed buffers post-free.
- Verify SshResourceFree zeroes ssh->k, ssh->keys, and ssh->peerKeys
before wolfSSH_free releases the struct.
- Verify KeyAgreeDh_client wipes ssh->handshake->x even when wc_DhAgree
fails (ForceZero is unconditional).
- Verify KeyAgreeDh_server zeroes the MAX_KEX_KEY_SZ y_ptr allocation
under WOLFSSH_SMALL_STACK via 0xCC poisoning.
- Expose KeyAgreeDh_client / KeyAgreeDh_server via wolfSSH_Test* hooks
under WOLFSSH_TEST_INTERNAL.
Issues: F-2488, F-2492, F-2493, F-28751 parent fb1aa6d commit 162dd7f
3 files changed
Lines changed: 466 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18118 | 18118 | | |
18119 | 18119 | | |
18120 | 18120 | | |
| 18121 | + | |
| 18122 | + | |
| 18123 | + | |
| 18124 | + | |
| 18125 | + | |
| 18126 | + | |
| 18127 | + | |
| 18128 | + | |
| 18129 | + | |
| 18130 | + | |
| 18131 | + | |
| 18132 | + | |
| 18133 | + | |
| 18134 | + | |
| 18135 | + | |
| 18136 | + | |
18121 | 18137 | | |
18122 | 18138 | | |
18123 | 18139 | | |
| |||
0 commit comments