| Message ID | CAB8Pm=xgCG8wwDcfkSgSVnCMD_GZRwxLfnFa=EDxV14Lrrx-1w@mail.gmail.com |
|---|---|
| State | New |
| Headers | show
Return-Path:
<hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
secure) header.d=lists.infradead.org header.i=@lists.infradead.org
header.a=rsa-sha256 header.s=bombadil.20210309 header.b=r+1rbUiB;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20251104 header.b=hYEJ4wo9;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.infradead.org
(client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;
envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;
receiver=patchwork.ozlabs.org)
Received: from bombadil.infradead.org (bombadil.infradead.org
[IPv6:2607:7c80:54:3::133])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4j9yJ82sdnz1yJY
for <incoming@patchwork.ozlabs.org>; Fri, 23 Oct 2026 20:23:46 +1100 (AEDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help
:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:To:Subject:
Message-ID:Date:MIME-Version:References:In-Reply-To:From:Reply-To:Cc:
Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:
Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Unsubscribe-Post:List-Owner;
bh=B6OXZrCYyaP32ddKPDjeUWNUMUMo8sojQ+LZQECfGAE=; b=r+1rbUiBOOW0Lj7qz89aad6nuU
JAz0Jnv1D81ijkRkcRKKkC5iTV1M9slON/8OWI0XYJWC+/tQIpjLnyUUTc+Zu43UnqYP6fYUS39Kj
YhVsnOY16rS+WC0TdyUZxcY/KttO9HhyCiuSbtJLywL/MdnUs0CCtF/iigF9pk7e9cVeo6w7dUeD2
gHY8qedaNlqMJsioQvMZeJk1fBhEZoR/Vim4fog5NXXkstN1lI3m+aTxxVClLYZDmsfpLBLddDAJ9
KVO2wb2uQdNDnjyxa4ckQdTeLnIuA9sHxEKPSewOrpfkNdwQmx0s2u50vUmdXQUOCUHsu33BcBZV0
89ABynDw==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux))
id 1xKBTu-0000000G05g-0HV1;
Fri, 23 Oct 2026 09:22:34 +0000
Received: from mail-pl1-x62e.google.com ([2607:f8b0:4864:20::62e])
by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
id 1xI4At-00000004mUO-2KVb
for hostap@lists.infradead.org;
Sat, 17 Oct 2026 13:10:12 +0000
Received: by mail-pl1-x62e.google.com with SMTP id
d9443c01a7336-2e940d5d2beso2505855ad.0
for <hostap@lists.infradead.org>;
Sat, 17 Oct 2026 06:10:11 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1792242610; cv=none;
d=google.com; s=arc-20260327;
b=kw8pOVz7QlZOk1NdNJ+24I0UHPOqketihYpiuqER8BWqVFU7+UmYyUNHchJwe08809
oB9gUy8uTB4m0bc+Fg8jqJeNQ3mJNSEHx9ncqjMIRV02l8UX+XFDds1mrXykVb7wYSLG
8odtpkmuS43eccpk3IN9ZN5QrbgpOlXA3kcN85e09q5cL9X9/z81cSkrK/Bnwhkkq5dL
N67bwac58pvvMsLQGr8pmkPq8G+kiYQQ4vTBTBDHug0Pas3lzlwP4qNl5UtOZI8E6wTL
1JjitXdH6L1CwbRvSPHpD0QmV888YhlWRfgb0neO769RaiyoWCAlW0uy9r97Qt7KmmcT
hkyw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=to:subject:message-id:date:mime-version:references:in-reply-to:from
:dkim-signature;
bh=rNb0v5KKjQBBPuOFbmHRiA/zE3RMKkFFLjxSv6pJD08=;
fh=RepBDIVbUTRsjfbrO/5AjcaOU1JdnBduCNdRP0Vpu7Q=;
b=J/r97+iaJtZ82eLisfrHR4ToNt6yb0mKkMEqSOYSP+JVDZBVH8i8vzuE1dWGDWbtai
GdShQhMbksC/5HrOgHwuqL5sg4w59g7zKxTm2UFqckuxCc+mshrr0zh4NTGE3NxHdM2n
lnx4QYXejPCZzV0b0oov1KTIklJZe+EZudSkqIN8QPSg4PgHbolX9No8llrhppnX/jT8
gLcikX85xnIwE6vh3QW23fz0yFIXbshTVC58tA9aJJaRwGLsEdPsYo6nG2OOaaj4+6gz
TvIszn7zdpp/QVHI8lJnEtl6UNClCmXQguTtwNNCaxrhph2RqHokkeBuYADD6t6kXjSx
tz+Q==;
darn=lists.infradead.org
ARC-Authentication-Results: i=1; mx.google.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792242610; x=1792847410;
darn=lists.infradead.org;
h=content-type:to:subject:message-id:date:mime-version:references
:in-reply-to:from:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=rNb0v5KKjQBBPuOFbmHRiA/zE3RMKkFFLjxSv6pJD08=;
b=hYEJ4wo9q48AfAbYc1fMF7w4B3O6tg9pQhmqdlxQRYaJteBn/y/WjHajXlUpucys9Z
7hteU3ui0i+ZUbrjrk/Bfi5+7WB4D1lLbCYIt/vUD0UEAJ4ZklIUWOyPXb4qkQWjy6gS
6Kd2EorbaqWQxNWJKHCpyxQOIfQTH8QFbhd8jM76ZnCYii9QYVP5IhULDHDUCApVt5M4
B7GLP/lx/+68fZVHDI09gnf2qxlxq2qI4jZhCi1O/UhKdXJdn3/x+PcBsfQrf0lCzuE4
Oie70tu/SQ9rmQJVu3lDHhvYA1+VaHKLgqokWsYCVnofuKP1wxmi7egg9L4hyZUiepv9
lczA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792242610; x=1792847410;
h=content-type:to:subject:message-id:date:mime-version:references
:in-reply-to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=rNb0v5KKjQBBPuOFbmHRiA/zE3RMKkFFLjxSv6pJD08=;
b=jc4DB2NTNY3CNNR7uQ3mYXgPQNNqw2IcwhS4JEVU1L6ofpJddFPNSAB7DRounCvet0
kE6WVtnmTOTOJTK4cGA1GGF6uO5AFUNPNeVCyCbN80XYUXonCcXOKQSOk7KV8hemzU/7
9/GzqGNmwVyf/Fs+fdXOlGRSW+KZZC7T4CYRS9gwONsiu7/+sdHOB4H9LkGNO8XSrNBQ
wORvX5AlQTTS1DYWSxV+xL49r3Qh4gLVhNT/sb48WGo3d/kN4eHihcmS0SiMqTtloz5Z
WW3vg7iZPyYX/QCAi4qicoHkiwQcHIMsL9ycS7GI6l7AAhS4AdlTLpakSbMKXk/XlX7f
OmIg==
X-Gm-Message-State: AFq9FYIdKz/EF/Rz+bcWGx6ZkEXqwy2w9iZtA5Q2FAJhX1+yFsa0LzZD
1q6cptUkSBXznEV7zHG3Q3Qq/baZsRGY5grIzfAWiTytHAVAI4YJSZsXROxfVCadHnbONTxGGUD
NoiDx5CFV/KmaILI/fWjOGeH3q2E4NqFOgfkz3uZrZ8ZD
X-Gm-Gg: AYBFou2H350kAKrmRNKQl+JdOQLhjuaeeuqa2a9yCAdJCK6iPGcl8IRQfJVabp0XUVQ
cX5vGe9CXTwVTbjauru8FaYMZ6JU0/DYuUfuo67XIVNDTdxLfwEahzhYajehX5Z46TWOQaDFywK
lWB0vIea+s+0yggAqFWZOP/saPaQ7TTySBEHpRP7RxnMXZqKri8+elkBZxq4XeSyVAJMuoRvwdC
FhhifOETjD18RExZs0RWNpGmILeCWyzIzcybZK7EpwWlXvJkO6BKJgLsfQQBa8Qi1GK2AjYKvDi
7fTPohokSFjZjSPgIcxPgGA3IeFH/VwR8LxqW2mEws6pXBVEkQ3pg0jpnTnhmF9cC8Po04iFwUt
77re43zESJvTvfHrM3KnMXPVF/DCOar4/nXnd/wlEnQ==
X-Received: by 2002:a17:902:ec86:b0:2dd:c053:82f6 with SMTP id
d9443c01a7336-2e9a6a0c16bmr21961495ad.45.1792242610538; Sat, 17 Oct 2026
06:10:10 -0700 (PDT)
Received: from 1077388689865 named unknown by gmailapi.google.com with
HTTPREST; Sat, 17 Oct 2026 09:10:09 -0400
Received: from 1077388689865 named unknown by gmailapi.google.com with
HTTPREST; Sat, 17 Oct 2026 09:10:09 -0400
From: Alejandro Pacheco <alepacheco99@gmail.com>
In-Reply-To:
<CAB8Pm=yPXRHHk=HWJv4xx6-=fqXn8sS2qd6C50=OF8bmcTCWcA@mail.gmail.com>
References:
<CAB8Pm=yPXRHHk=HWJv4xx6-=fqXn8sS2qd6C50=OF8bmcTCWcA@mail.gmail.com>
MIME-Version: 1.0
Date: Sat, 17 Oct 2026 09:10:09 -0400
X-Gm-Features: AclHuK9jBrUzXXYrwMJwFhIq1dyTwFzCYvPOqvB64mHHOT7vrafEBL6rbZVyaF0
Message-ID:
<CAB8Pm=xgCG8wwDcfkSgSVnCMD_GZRwxLfnFa=EDxV14Lrrx-1w@mail.gmail.com>
Subject: [PATCH RESEND 2/2] wpa_supplicant: Clear WPA/EAPOL config when the
current network is removed
To: hostap@lists.infradead.org
Content-Type: multipart/mixed; boundary="000000000000273b26065e090067"
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20261017_061011_903783_2316061E
X-CRM114-Status: GOOD ( 13.30 )
X-Spam-Score: -1.9 (-)
X-Spam-Report: Spam detection software,
running on the system "bombadil.infradead.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: wpas_notify_network_removed() clears wpa_s->current_ssid
when
the network block being removed is the current one, but the WPA and EAPOL
state machines keep their own pointers to that network block (th [...]
Content analysis details: (-1.9 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no
trust
[2607:f8b0:4864:20:0:0:0:62e listed in]
[list.dnswl.org]
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-0.0 SPF_PASS SPF: sender matches SPF record
-0.1 DKIM_VALID Message has at least one valid DKIM or DK
signature
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's
domain
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider
[alepacheco99(at)gmail.com]
0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in
digit
[alepacheco99(at)gmail.com]
-0.0 DMARC_PASS DMARC pass policy
X-Mailman-Approved-At: Fri, 23 Oct 2026 02:22:33 -0700
X-BeenThere: hostap@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <hostap.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>,
<mailto:hostap-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/hostap/>
List-Post: <mailto:hostap@lists.infradead.org>
List-Help: <mailto:hostap-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>,
<mailto:hostap-request@lists.infradead.org?subject=subscribe>
Sender: "Hostap" <hostap-bounces@lists.infradead.org>
Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org
|
| Series |
[RESEND,1/2] WPS: Keep the in-use network valid when removing a duplicate credential
|
expand
|
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c index 18cd63113..13e201c46 100644 --- a/wpa_supplicant/notify.c +++ b/wpa_supplicant/notify.c @@ -20,6 +20,7 @@ #include "dbus/dbus_new.h" #include "rsn_supp/wpa.h" #include "rsn_supp/pmksa_cache.h" +#include "eapol_supp/eapol_supp_sm.h" #include "fst/fst.h" #include "crypto/tls.h" #include "bss.h" @@ -412,8 +413,11 @@ void wpas_notify_network_removed(struct wpa_supplicant *wpa_s, wpa_s->next_ssid = NULL; if (wpa_s->last_ssid == ssid) wpa_s->last_ssid = NULL; - if (wpa_s->current_ssid == ssid) + if (wpa_s->current_ssid == ssid) { wpa_s->current_ssid = NULL; + wpa_sm_set_config(wpa_s->wpa, NULL); + eapol_sm_notify_config(wpa_s->eapol, NULL, NULL); + } if (wpa_s->ml_connect_probe_ssid == ssid) { wpa_s->ml_connect_probe_ssid = NULL; wpa_s->ml_connect_probe_bss = NULL;
wpas_notify_network_removed() clears wpa_s->current_ssid when the network block being removed is the current one, but the WPA and EAPOL state machines keep their own pointers to that network block (the network context and the EAP peer configuration). wpa_supplicant_remove_network(), wpa_supplicant_remove_all_networks() and wpas_clear_wps() clear these explicitly before freeing the block, but some other paths that call wpas_notify_network_removed() and wpa_config_remove_network() do not, so removing the current network on one of those paths leaves the state machines pointing to freed memory. Clear the WPA and EAPOL configuration at the same place current_ssid is cleared so that every removal of the current network through this notification drops these references together. Signed-off-by: Alejandro Pacheco <alepacheco99@gmail.com> --- Resent: the first posting of this patch (<CAB8Pm=wr7qy2VBxuQyLYwrXS=gFnhVwmA0psNH_DQ6HTs1oDTQ@mail.gmail.com>) reached the list with its long lines wrapped, so it does not apply. The patch is unchanged. This time the diff is attached as plain text so that it arrives intact; git am takes this mail as it is. wpa_supplicant/notify.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)