dpp: zero nonces/keys on dpp_reset
James Prestwood
PATCH 1/2 dpp: zero nonces/keys on dpp_reset
--- src/dpp.c | 6 ++++++ 1 file changed, 6 insertions(+)
src/dpp.c +6 -0
@@ -163,6 +163,12 @@ static void dpp_reset(struct dpp_sm *dpp) dpp->state =DPP_STATE_NOTHING ; +explicit_bzero (dpp->r_nonce, dpp->nonce_len); +explicit_bzero (dpp->i_nonce, dpp->nonce_len); +explicit_bzero (dpp->e_nonce, dpp->nonce_len); +explicit_bzero (dpp->ke, dpp->key_len); +explicit_bzero (dpp->k2, dpp->key_len); +dpp_free_auth_data (dpp); }
Signature · 1 line
2.31.1
James Prestwood
PATCH 2/2 dpp: init unwrapped pointer to NULL
Fixes possible issues with auto-free on error paths
--- src/dpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/dpp.c +1 -1
@@ -780,7 +780,7 @@ static void dpp_handle_config_result_frame(struct dpp_sm *dpp,const void *e_nonce =NULL ;const void *wrapped =NULL ;size_t wrapped_len; - _auto_(l_free) void *unwrapped; + _auto_(l_free) void *unwrapped = NULL;if (dpp->state !=DPP_STATE_CONFIGURING )return ;
Signature · 1 line
2.31.1
Denis Kenzior
Hi James,
Quoted 4 lines · James Prestwood
--- src/dpp.c | 6 ++++++ 1 file changed, 6 insertions(+)
Both applied, thanks.
Regards,
-Denis