NetBSD Problem Report #58735

From martin@aprisoft.de  Thu Oct 10 05:13:34 2024
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 4EC6A1A923B
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 10 Oct 2024 05:13:34 +0000 (UTC)
Message-Id: <20241010051324.A479E5CC795@emmas.aprisoft.de>
Date: Thu, 10 Oct 2024 07:13:24 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: new wpa_supplicant is not working on NetBSD
X-Send-Pr-Version: 3.95

>Number:         58735
>Notify-List:    bsiegert@NetBSD.org
>Category:       bin
>Synopsis:       spurious error messages when deleting keys from wpa_supplicant
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    martin
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 10 05:15:00 +0000 2024
>Last-Modified:  Sat Oct 12 08:07:17 +0000 2024
>Originator:     Martin Husemann
>Release:        NetBSD 10.99.12
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD martins.aprisoft.de 10.99.12 NetBSD 10.99.12 (GENERIC) #247: Wed Oct 9 20:47:53 CEST 2024 martin@martins.aprisoft.de:/home/martin/current/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:

New wpa_supplicant fails to bring up interfaces because it tries to delete
(hardware) keys that are not supported by our kernel.

The old version had code like:

void wpa_clear_keys(struct wpa_supplicant *wpa_s, const u8 *addr)
{
        int i, max;

#ifdef CONFIG_IEEE80211W
        max = 6;
#else /* CONFIG_IEEE80211W */
        max = 4;
#endif /* CONFIG_IEEE80211W */

and the tried to delete 4 keys (which matches what the kernel can do).
The new code unconditionally tries to delete 6 keys, which makes the kernel
reject the calls for the last two.

>How-To-Repeat:

Try to use wlan.

>Fix:
n/a

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/58735: wpa_supplicant causes spurious log errors trying to
 delete keys out of range
Date: Thu, 10 Oct 2024 15:30:45 +0200

 This seems to be from an upstream change:

 commit 7d2ed8bae86a31dd2df45c24b3f7281d55315482
 Author: Jouni Malinen <j@w1.fi>
 Date:   Sun Sep 8 17:17:31 2019 +0300

     Remove CONFIG_IEEE80211W build parameter

     Hardcode this to be defined and remove the separate build options for
     PMF since this functionality is needed with large number of newer
     protocol extensions and is also something that should be enabled in all
     WPA2/WPA3 networks.

     Signed-off-by: Jouni Malinen <j@w1.fi>


 Our local build environment needs to be adjusted for that.

 The kernel part needs to change to deal with two more keys, or the error
 log should be silenced.

 Since other have reported their wifi is still working, this is mostly a
 cosmetic issue (log noise).

 Martin

Responsible-Changed-From-To: bin-bug-people->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Thu, 10 Oct 2024 15:03:28 +0000
Responsible-Changed-Why:
I'll deal with it


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.