a601323f14da8a98f08c6ee02367ac74890059f3
[openwrt/staging/yousong.git] /
1 From 28a069a545b06b99eb55ad53f63f2c99e65a98f6 Mon Sep 17 00:00:00 2001
2 From: Jouni Malinen <j@w1.fi>
3 Date: Sat, 2 May 2015 19:26:28 +0300
4 Subject: [PATCH 5/5] EAP-pwd peer: Fix asymmetric fragmentation behavior
5
6 The L (Length) and M (More) flags needs to be cleared before deciding
7 whether the locally generated response requires fragmentation. This
8 fixes an issue where these flags from the server could have been invalid
9 for the following message. In some cases, this could have resulted in
10 triggering the wpabuf security check that would terminate the process
11 due to invalid buffer allocation.
12
13 Signed-off-by: Jouni Malinen <j@w1.fi>
14 ---
15 src/eap_peer/eap_pwd.c | 1 +
16 1 file changed, 1 insertion(+)
17
18 diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c
19 index 1d2079b..e58b13a 100644
20 --- a/src/eap_peer/eap_pwd.c
21 +++ b/src/eap_peer/eap_pwd.c
22 @@ -968,6 +968,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret,
23 /*
24 * we have output! Do we need to fragment it?
25 */
26 + lm_exch = EAP_PWD_GET_EXCHANGE(lm_exch);
27 len = wpabuf_len(data->outbuf);
28 if ((len + EAP_PWD_HDR_SIZE) > data->mtu) {
29 resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, data->mtu,
30 --
31 1.9.1
32