mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
nl80211: Check for proper nlmsg allocation in send_and_recv_msgs_owner()
When nlmsg allocation fails, nl80211_drv_msg() returns NULL and the call
to send_and_recv_msgs_owner() from nl80211_leave_ibss() could have ended
up dereferencing a NULL pointer. Fix this by make
send_and_recv_msgs_owner() more consistent with other send_and_recv*()
cases that check msg == NULL internally.
Fixes: 12ea7dee31
("nl80211: Use nl80211 control port for receiving EAPOL frames")
Signed-off-by: Pooventhiran G <pooventh@codeaurora.org>
This commit is contained in:
parent
02289ab537
commit
0577e8e679
@ -502,6 +502,9 @@ static int send_and_recv_msgs_owner(struct wpa_driver_nl80211_data *drv,
|
|||||||
void *),
|
void *),
|
||||||
void *ack_data)
|
void *ack_data)
|
||||||
{
|
{
|
||||||
|
if (!msg)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
/* Control port over nl80211 needs the flags and attributes below.
|
/* Control port over nl80211 needs the flags and attributes below.
|
||||||
*
|
*
|
||||||
* The Linux kernel has initial checks for them (in nl80211.c) like:
|
* The Linux kernel has initial checks for them (in nl80211.c) like:
|
||||||
|
Loading…
Reference in New Issue
Block a user