mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-09 00:12:36 +01:00
wscutil: Check authenticator more strictly
Make sure Authenticator is the last data in the WSC PDU, with no extraneous data afterwards
This commit is contained in:
parent
c6f086d741
commit
b650b16d6f
@ -700,6 +700,11 @@ static int wsc_parse_attrs(const unsigned char *pdu, unsigned int len,
|
|||||||
parse_error = true;
|
parse_error = true;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wsc_attr_iter_get_pos(&iter) != len) {
|
||||||
|
parse_error = true;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -324,6 +324,11 @@ static inline const unsigned char *wsc_attr_iter_get_data(
|
|||||||
return iter->data;
|
return iter->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline unsigned int wsc_attr_iter_get_pos(struct wsc_attr_iter *iter)
|
||||||
|
{
|
||||||
|
return iter->pos;
|
||||||
|
}
|
||||||
|
|
||||||
struct wsc_primary_device_type {
|
struct wsc_primary_device_type {
|
||||||
uint16_t category;
|
uint16_t category;
|
||||||
uint8_t oui[3];
|
uint8_t oui[3];
|
||||||
|
Loading…
Reference in New Issue
Block a user