mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
mpdu: fix transaction_sequence byte-ordering
transaction_sequence was not being considered in host CPU byte order
This commit is contained in:
parent
e60b814dc8
commit
5247695d56
@ -71,6 +71,8 @@ static bool validate_disassociation_mgmt_mpdu(const struct mpdu *mpdu,
|
|||||||
static bool validate_authentication_mgmt_mpdu(const struct mpdu *mpdu,
|
static bool validate_authentication_mgmt_mpdu(const struct mpdu *mpdu,
|
||||||
int len, int *offset)
|
int len, int *offset)
|
||||||
{
|
{
|
||||||
|
uint16_t transaction_sequence;
|
||||||
|
|
||||||
if (len < *offset + 6)
|
if (len < *offset + 6)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -80,8 +82,10 @@ static bool validate_authentication_mgmt_mpdu(const struct mpdu *mpdu,
|
|||||||
case MPDU_AUTH_ALGO_OPEN_SYSTEM:
|
case MPDU_AUTH_ALGO_OPEN_SYSTEM:
|
||||||
return *offset <= len;
|
return *offset <= len;
|
||||||
case MPDU_AUTH_ALGO_SHARED_KEY:
|
case MPDU_AUTH_ALGO_SHARED_KEY:
|
||||||
if (mpdu->auth.transaction_sequence < 2 ||
|
transaction_sequence =
|
||||||
mpdu->auth.transaction_sequence > 3)
|
L_LE16_TO_CPU(mpdu->auth.transaction_sequence);
|
||||||
|
|
||||||
|
if (transaction_sequence < 2 || transaction_sequence > 3)
|
||||||
return *offset == len;
|
return *offset == len;
|
||||||
|
|
||||||
if (len < *offset + 2)
|
if (len < *offset + 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user