Skip to contentSkip to conversation

nl80211: Include ies_len for nlmsg from ft_event

PATCH In review Srinivas Dasari 2 participants 2 messages May 29, 2018 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nl80211: Include ies_len for nlmsg from ft_event

Length of the ies is not considered while allocating nl message for ft_event, though they are filled. Hence, consider the length also for nl_msg.

---
 net/wireless/nl80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/wireless/nl80211.c +2 -1
index bc40a78..8ad0bc0 100644
@@ -15817,7 +15817,8 @@ void cfg80211_ft_event(struct net_device *netdev,
 	if (!ft_event->target_ap)
 		return;
 
-	msg = nlmsg_new(100 + ft_event->ric_ies_len, GFP_KERNEL);
+	msg = nlmsg_new(100 + ft_event->ric_ies_len + ft_event->ies_len,
+			GFP_KERNEL);
 	if (!msg)
 		return;
 
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
maintainer
#1 lore raw
Quoted 3 lines · Srinivas Dasari

Length of the ies is not considered while allocating nl message for ft_event, though they are filled. Hence, consider the length also for nl_msg.

THis was already fixed by

nl80211: fix nlmsg allocation in cfg80211_ft_event

johannes