Attention is currently required from: Arne Schwabe.
Hello Arne Schwabe,
I'd like you to do a code review.
Please visit
https://gerrit.openvpn.net/c/openvpn/+/2099?usp=email
to review the following change.
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]>
---
M src/openvpn/ssl_mbedtls.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/99/2099/1
diff --git a/src/openvpn/ssl_mbedtls.c b/src/openvpn/ssl_mbedtls.c
index 8aaca96..9561abb 100644
--- a/src/openvpn/ssl_mbedtls.c
+++ b/src/openvpn/ssl_mbedtls.c
@@ -481,6 +481,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
@@ -491,6 +492,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: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I5099b109d43664d5b83adfded6adfaf5ae9d608f
Gerrit-Change-Number: 2099
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel