[PATCH] gsupplicant: Fix SIGSEGV in p2p_stop_find on NULL interface
Shailesh Rathod/LGSI Secure & Connected Task <[email protected]> Mon, 11 May 2026 08:30:03 +0000
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <SE1P216MB26472F81214100EA481E66BCF0382@SE1P216MB2647.KORP216.PROD.OUTLOOK.COM> |
From: shailesh <[email protected]>=0A= Date: Mon, 11 May 2026 08:01:32 +0000=0A= Subject: [PATCH] gsupplicant: Fix SIGSEGV in p2p_stop_find on NULL interfac= e=0A= =0A= Add a NULL check for the interface pointer in=0A= g_supplicant_interface_p2p_stop_find() to prevent a crash when=0A= called from trigger_auto_scan() in wifi.c where the interface=0A= may not be initialized.=0A= =0A= Signed-off-by: shailesh <[email protected]>=0A= ---=0A= =A0gsupplicant/supplicant.c | 2 +-=0A= =A01 file changed, 1 insertion(+), 1 deletion(-)=0A= =0A= diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c=0A= index 5e289953..a50d61db 100644=0A= --- a/gsupplicant/supplicant.c=0A= +++ b/gsupplicant/supplicant.c=0A= @@ -5442,7 +5442,7 @@ bool g_supplicant_interface_is_p2p_finding(GSupplican= tInterface *interface)=0A= =A0=0A= =A0int g_supplicant_interface_p2p_stop_find(GSupplicantInterface *interface= )=0A= =A0{=0A= - if (!interface->p2p_finding)=0A= + if (!interface || !interface->p2p_finding)=0A= =A0 =A0return 0;=0A= =A0=0A= =A0 SUPPLICANT_DBG("");=0A= --=0A= 2.34.1=