From ef5a9a009d7e1341b6a341edd7ab3e4a56d61167 Mon Sep 17 00:00:00 2001 From: Vinay Gannevaram Date: Fri, 21 Oct 2022 15:13:44 +0530 Subject: [PATCH] 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 --- src/drivers/driver_nl80211_event.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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++;