Attention is currently required from: Arne Schwabe, Gert Doering. Hansaem Wi has posted comments on this change by Hansaem Wi. ( https://gerrit.openvpn.net/c/openvpn/+/2076?usp=email )
Change subject: auth_token: Wipe the server secret key after loading it ...................................................................... Patch Set 1: (1 comment) File src/openvpn/auth_token.c: https://gerrit.openvpn.net/c/openvpn/+/2076/comment/2b59e930_e9fc3717?usp=email : PS1, Line 176: buf_clear(&server_secret_key); > this is doing the `secure_memzero()` twice, as `buf_clear()` already does it > - so yes on the concept […] Thanks for the review. The two calls wipe two different copies of the key, so I don't think one of them is redundant here: - buf_read() copies the key out of server_secret_key into the struct key on the stack, so after init_key_ctx() the key is still both in `key` on the stack and in the 2048-byte heap buffer that read_pem_key_file() or generate_ephemeral_key() filled. - secure_memzero(&key, sizeof(key)) wipes the stack copy, as tls_crypt_v2_init_server_key() does with srv_key. There the buffer points at srv_key itself, so one call covers both. - buf_clear(&server_secret_key) wipes the heap buffer before free_buf(). This heap copy is the one that was found by scanning freed blocks in test_auth_token. If you would rather keep only one of them, I would keep buf_clear(). I can also add a short comment to each line so the two copies are obvious. -- To view, visit https://gerrit.openvpn.net/c/openvpn/+/2076?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ib5eb24b156acb5a99c614050fb1bd64fe46d8b52 Gerrit-Change-Number: 2076 Gerrit-PatchSet: 1 Gerrit-Owner: Hansaem Wi <[email protected]> Gerrit-Reviewer: Arne Schwabe <[email protected]> Gerrit-Reviewer: Gert Doering <[email protected]> Gerrit-CC: openvpn-devel <[email protected]> Gerrit-Attention: Arne Schwabe <[email protected]> Gerrit-Attention: Gert Doering <[email protected]> Gerrit-Comment-Date: Sun, 01 Nov 2026 12:38:40 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Gert Doering <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
