3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +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:
Denis Kenzior 2016-08-28 02:45:40 -05:00
parent c6f086d741
commit b650b16d6f
2 changed files with 10 additions and 0 deletions

View File

@ -700,6 +700,11 @@ static int wsc_parse_attrs(const unsigned char *pdu, unsigned int len,
parse_error = true;
goto done;
}
if (wsc_attr_iter_get_pos(&iter) != len) {
parse_error = true;
goto done;
}
}
/*

View File

@ -324,6 +324,11 @@ static inline const unsigned char *wsc_attr_iter_get_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 {
uint16_t category;
uint8_t oui[3];