From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 3/4] eapol: check return of ie_parse_rsne_from_data
Date: Wed, 16 Oct 2019 16:43:03 -0700 [thread overview]
Message-ID: <20191016234304.14716-3-prestwoj@gmail.com> (raw)
In-Reply-To: <20191016234304.14716-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
---
src/eapol.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/eapol.c b/src/eapol.c
index cbaf0f4f..6f04dbc5 100644
--- a/src/eapol.c
+++ b/src/eapol.c
@@ -1106,7 +1106,8 @@ static void eapol_handle_ptk_1_of_4(struct eapol_sm *sm,
pmkid = handshake_util_find_pmkid_kde(EAPOL_KEY_DATA(ek, sm->mic_len),
EAPOL_KEY_DATA_LEN(ek, sm->mic_len));
- ie_parse_rsne_from_data(own_ie, own_ie[1] + 2, &rsn_info);
+ if (ie_parse_rsne_from_data(own_ie, own_ie[1] + 2, &rsn_info) < 0)
+ goto error_unspecified;
/*
* Require the PMKID KDE whenever we've sent a list of PMKIDs in
@@ -1557,7 +1558,8 @@ static void eapol_handle_ptk_3_of_4(struct eapol_sm *sm,
const uint8_t *mde = sm->handshake->mde;
const uint8_t *fte = sm->handshake->fte;
- ie_parse_rsne_from_data(rsne, rsne[1] + 2, &ie_info);
+ if (ie_parse_rsne_from_data(rsne, rsne[1] + 2, &ie_info) < 0)
+ goto error_ie_different;
if (ie_info.num_pmkids != 1 || memcmp(ie_info.pmkids,
sm->handshake->pmk_r1_name, 16))
--
2.17.1
next prev parent reply other threads:[~2019-10-16 23:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 23:43 [PATCH 1/4] util: add bounds check to util_get_{domain,username} James Prestwood
2019-10-16 23:43 ` [PATCH 2/4] eapol: reorder eapol_sm_free James Prestwood
2019-10-17 2:18 ` Denis Kenzior
2019-10-16 23:43 ` James Prestwood [this message]
2019-10-17 2:25 ` [PATCH 3/4] eapol: check return of ie_parse_rsne_from_data Denis Kenzior
2019-10-16 23:43 ` [PATCH 4/4] ie: reorder ie_parse_osen to fix uninitialized value James Prestwood
2019-10-17 2:25 ` Denis Kenzior
2019-10-17 2:15 ` [PATCH 1/4] util: add bounds check to util_get_{domain,username} 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=20191016234304.14716-3-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/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