Skip to content

Commit bbf3997

Browse files
committed
wifi: ath11k: fix gtk offload status event locking
jira LE-1907 cve CVE-2023-52777 Rebuild_History Non-Buildable kernel-4.18.0-553.16.1.el8_10 commit-author Johan Hovold <[email protected]> commit 1dea3c0 The ath11k active pdevs are protected by RCU but the gtk offload status event handling code calling ath11k_mac_get_arvif_by_vdev_id() was not marked as a read-side critical section. Mark the code in question as an RCU read-side critical section to avoid any potential use-after-free issues. Compile tested only. Fixes: a16d9b5 ("ath11k: support GTK rekey offload") Cc: [email protected] # 5.18 Cc: Carl Huang <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 1dea3c0) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 0ff207b commit bbf3997

File tree

1 file changed

+5
-2
lines changed
  • drivers/net/wireless/ath/ath11k

1 file changed

+5
-2
lines changed

drivers/net/wireless/ath/ath11k/wmi.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8506,12 +8506,13 @@ static void ath11k_wmi_gtk_offload_status_event(struct ath11k_base *ab,
85068506
return;
85078507
}
85088508

8509+
rcu_read_lock();
8510+
85098511
arvif = ath11k_mac_get_arvif_by_vdev_id(ab, ev->vdev_id);
85108512
if (!arvif) {
85118513
ath11k_warn(ab, "failed to get arvif for vdev_id:%d\n",
85128514
ev->vdev_id);
8513-
kfree(tb);
8514-
return;
8515+
goto exit;
85158516
}
85168517

85178518
ath11k_dbg(ab, ATH11K_DBG_WMI, "wmi gtk offload event refresh_cnt %d\n",
@@ -8528,6 +8529,8 @@ static void ath11k_wmi_gtk_offload_status_event(struct ath11k_base *ab,
85288529

85298530
ieee80211_gtk_rekey_notify(arvif->vif, arvif->bssid,
85308531
(void *)&replay_ctr_be, GFP_ATOMIC);
8532+
exit:
8533+
rcu_read_unlock();
85318534

85328535
kfree(tb);
85338536
}

0 commit comments

Comments
 (0)