]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix parsing PASN peer and src addresses from vendor nl attributes
authorVinay Gannevaram <quic_vganneva@quicinc.com>
Fri, 21 Oct 2022 09:43:44 +0000 (15:13 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 3 Nov 2022 15:37:38 +0000 (17:37 +0200)
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 <quic_jouni@quicinc.com>
src/drivers/driver_nl80211_event.c

index db3c9c180254aa070230280f6680bb723a37c1f6..aa172532c18a7cede75cdc244cee23088f4ee3a7 100644 (file)
@@ -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++;