[PATCH 04/16] PR: Clear ranging params on PASN initiator session failure

Peddolla Harshavardhan Reddy peddolla.reddy at oss.qualcomm.com
Sun Jul 12 23:29:52 PDT 2026


When a PASN initiator session ends without completing, pr_pasn_params
is left allocated in wpas_pr_pasn_timeout() and in the credential
setup failure path of wpas_pr_pasn_trigger(), causing subsequent
PR_PASN_START requests to fail with "Already in progress". Add
wpas_pr_clear_ranging_params() to both paths so pr_pasn_params is
freed whenever the initiator session is abandoned.

Fixes: d6ce72875135 ("PR: Add interface to trigger PASN authentication for ranging")
Fixes: f8121bec4096 ("PR: Allow PMK and password configuration in PR_PASN_START")
Signed-off-by: Peddolla Harshavardhan Reddy <peddolla.reddy at oss.qualcomm.com>
---
 wpa_supplicant/pr_supplicant.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/wpa_supplicant/pr_supplicant.c b/wpa_supplicant/pr_supplicant.c
index 1b928448a..dcf913255 100644
--- a/wpa_supplicant/pr_supplicant.c
+++ b/wpa_supplicant/pr_supplicant.c
@@ -1179,6 +1179,8 @@ static void wpas_pr_pasn_timeout(void *eloop_ctx, void *timeout_ctx)
 	 */
 	wpas_pr_pd_stop(wpa_s);
 
+	wpas_pr_clear_ranging_params(wpa_s->global->pr);
+
 	wpa_printf(MSG_DEBUG, "PR: PASN timed out");
 }
 
@@ -1224,6 +1226,7 @@ fail:
 	radio_work_done(work);
 	/* Stop PD wdev after radio_work_done() to avoid use-after-free */
 	wpas_pr_pd_stop(wpa_s);
+	wpas_pr_clear_ranging_params(wpa_s->global->pr);
 }
 
 
-- 
2.34.1




More information about the Hostap mailing list