From: Vinay Gannevaram Date: Fri, 21 Oct 2022 09:43:44 +0000 (+0530) Subject: nl80211: Fix parsing PASN peer and src addresses from vendor nl attributes X-Git-Tag: hostap_2_11~1617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef5a9a009d7e1341b6a341edd7ab3e4a56d61167;p=thirdparty%2Fhostap.git nl80211: Fix parsing PASN peer and src addresses from vendor nl attributes Need to copy the actual data of the attribute, not the beginning of the data structure pointing to the attribute. Fixes: de3b91a172e5 ("nl80211: Define vendor interface functions to offload PASN authentication") Signed-off-by: Jouni Malinen --- diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index db3c9c180..aa172532c 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -2633,11 +2633,11 @@ static void qca_nl80211_pasn_auth(struct wpa_driver_nl80211_data *drv, nl_src = cfg[QCA_WLAN_VENDOR_ATTR_PASN_PEER_SRC_ADDR]; nl_peer = cfg[QCA_WLAN_VENDOR_ATTR_PASN_PEER_MAC_ADDR]; if (nl_src) - os_memcpy(event.pasn_auth.peer[idx].own_addr, nl_src, - ETH_ALEN); + os_memcpy(event.pasn_auth.peer[idx].own_addr, + nla_data(nl_src), ETH_ALEN); if (nl_peer) - os_memcpy(event.pasn_auth.peer[idx].peer_addr, nl_peer, - ETH_ALEN); + os_memcpy(event.pasn_auth.peer[idx].peer_addr, + nla_data(nl_peer), ETH_ALEN); if (cfg[QCA_WLAN_VENDOR_ATTR_PASN_PEER_LTF_KEYSEED_REQUIRED]) event.pasn_auth.peer[idx].ltf_keyseed_required = true; idx++;