mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
sae: Fix potential leak in sae_process_anti_clogging
We may receive multiple anti-clogging request messages. We memdup the token every time, without checking whether memory for one has already been allocated. Free the old token prior to allocating a new one.
This commit is contained in:
parent
67be05ec3e
commit
c02b1466c4
@ -898,6 +898,7 @@ static int sae_process_anti_clogging(struct sae_sm *sm, const uint8_t *ptr,
|
|||||||
return -EBADMSG;
|
return -EBADMSG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
l_free(sm->token);
|
||||||
sm->token = l_memdup(ptr, len);
|
sm->token = l_memdup(ptr, len);
|
||||||
sm->token_len = len;
|
sm->token_len = len;
|
||||||
sm->sync = 0;
|
sm->sync = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user