Wireless Daemon for Linux
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v2 2/4] owe: allow OWE to force group 19
Date: Mon,  8 Aug 2022 11:22:57 -0700	[thread overview]
Message-ID: <20220808182259.19402-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20220808182259.19402-1-prestwoj@gmail.com>

Similarly with SAE, some AP's either don't do group negotiations
right, or specifically with OWE, incorrectly derive the PTK unless
group 19 is used.
---
 src/owe.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

v2:
 * Remove extra flag from owe_sm since this is already in handshake_state

diff --git a/src/owe.c b/src/owe.c
index eed3e266..faa4e17d 100644
--- a/src/owe.c
+++ b/src/owe.c
@@ -45,6 +45,20 @@ struct owe_sm {
 
 static bool owe_reset(struct owe_sm *owe)
 {
+	if (owe->hs->force_default_owe_group) {
+		if (owe->retry != 0) {
+			l_warn("Forced default OWE group but was rejected!");
+			return false;
+		}
+
+		l_debug("Forcing default OWE group 19");
+
+		owe->retry++;
+		owe->group = 19;
+
+		goto get_curve;
+	}
+
 	/*
 	 * Reset OWE with a different curve group and generate a new key pair
 	 */
@@ -52,6 +66,8 @@ static bool owe_reset(struct owe_sm *owe)
 		return false;
 
 	owe->group = owe->ecc_groups[owe->retry];
+
+get_curve:
 	owe->curve = l_ecc_curve_from_ike_group(owe->group);
 
 	if (owe->private)
-- 
2.34.3


  reply	other threads:[~2022-08-08 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08 18:22 [PATCH v2 1/4] handshake: add force_default_owe_group flag James Prestwood
2022-08-08 18:22 ` James Prestwood [this message]
2022-08-08 18:22 ` [PATCH v2 3/4] network: add setter/getter/flag for forcing default OWE group James Prestwood
2022-08-08 18:22 ` [PATCH v2 4/4] station: re-try OWE if buggy AP is detected James Prestwood
2022-08-08 18:37 ` [PATCH v2 1/4] handshake: add force_default_owe_group flag 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=20220808182259.19402-2-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=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