* [PATCH] sae: fix incorrect length adjustment
@ 2019-10-21 21:59 James Prestwood
2019-10-21 22:12 ` Denis Kenzior
0 siblings, 1 reply; 2+ messages in thread
From: James Prestwood @ 2019-10-21 21:59 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
The commit/confirm processing was incorrectly subtracting 2 from
the length when they should be subtracting 6. As with the other
similar change, the length is validated with mpdu_validate so
subtracting 6 will not cause an overflow.
---
src/sae.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/sae.c b/src/sae.c
index 327277eb..a17c2883 100644
--- a/src/sae.c
+++ b/src/sae.c
@@ -1037,10 +1037,10 @@ static int sae_rx_authenticate(struct auth_proto *ap,
switch (L_LE16_TO_CPU(auth->transaction_sequence)) {
case SAE_STATE_COMMITTED:
return sae_process_commit(sm, hdr->address_2, auth->ies,
- len - 2);
+ len - 6);
case SAE_STATE_CONFIRMED:
return sae_process_confirm(sm, hdr->address_2, auth->ies,
- len - 2);
+ len - 6);
default:
l_error("invalid transaction sequence %u",
L_LE16_TO_CPU(auth->transaction_sequence));
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sae: fix incorrect length adjustment
2019-10-21 21:59 [PATCH] sae: fix incorrect length adjustment James Prestwood
@ 2019-10-21 22:12 ` Denis Kenzior
0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2019-10-21 22:12 UTC (permalink / raw)
To: iwd
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
Hi James,
On 10/21/19 4:59 PM, James Prestwood wrote:
> The commit/confirm processing was incorrectly subtracting 2 from
> the length when they should be subtracting 6. As with the other
> similar change, the length is validated with mpdu_validate so
> subtracting 6 will not cause an overflow.
> ---
> src/sae.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
Regards,
-Denis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-21 22:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-21 21:59 [PATCH] sae: fix incorrect length adjustment James Prestwood
2019-10-21 22:12 ` Denis Kenzior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.