Gert Doering has submitted this change. ( https://gerrit.openvpn.net/c/openvpn/+/2099?usp=email )
Change subject: ssl_mbedtls: wipe private key password buffer after use ...................................................................... ssl_mbedtls: wipe private key password buffer after use tls_ctx_load_priv_file() left the private key password on the stack. Clear passbuf with secure_memzero() once the key has been parsed. Change-Id: I5099b109d43664d5b83adfded6adfaf5ae9d608f Signed-off-by: Razvan Cojocaru <[email protected]> Acked-by: Frank Lichtenheld <[email protected]> Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2099 Message-Id: <[email protected]> URL: https://www.mail-archive.com/[email protected]/msg41302.html Signed-off-by: Gert Doering <[email protected]> --- M src/openvpn/ssl_mbedtls.c 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c index f4e142b..43bb0ff 100644 --- a/src/openvpn/ssl_mbedtls.c +++ b/src/openvpn/ssl_mbedtls.c @@ -486,6 +486,7 @@ status = mbedtls_pk_parse_key( ctx->priv_key, (const unsigned char *)priv_key_file, strlen(priv_key_file) + 1, (unsigned char *)passbuf, strlen(passbuf)); + secure_memzero(passbuf, sizeof(passbuf)); } } else @@ -496,6 +497,7 @@ char passbuf[512] = { 0 }; pem_password_callback(passbuf, 512, 0, NULL); status = mbedtls_pk_parse_keyfile(ctx->priv_key, priv_key_file, passbuf); + secure_memzero(passbuf, sizeof(passbuf)); } } if (!mbed_ok(status)) -- To view, visit https://gerrit.openvpn.net/c/openvpn/+/2099?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.openvpn.net/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I5099b109d43664d5b83adfded6adfaf5ae9d608f Gerrit-Change-Number: 2099 Gerrit-PatchSet: 2 Gerrit-Owner: Răzvan Cojocaru <[email protected]> Gerrit-Reviewer: Arne Schwabe <[email protected]> Gerrit-Reviewer: Frank Lichtenheld <[email protected]> Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________ Openvpn-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openvpn-devel
