public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj at gmail.com>
To: iwd at lists.01.org
Subject: [PATCH 1/2] dpp: zero nonces/keys on dpp_reset
Date: Wed, 22 Dec 2021 15:00:16 -0800	[thread overview]
Message-ID: <20211222230017.12587-1-prestwoj@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

---
 src/dpp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/dpp.c b/src/dpp.c
index 48343445..941c3f07 100644
--- a/src/dpp.c
+++ b/src/dpp.c
@@ -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);
 }
 
-- 
2.31.1

             reply	other threads:[~2021-12-22 23:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 23:00 James Prestwood [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-22 23:06 [PATCH 1/2] dpp: zero nonces/keys on dpp_reset Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211222230017.12587-1-prestwoj@gmail.com \
    --to=iwd@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox