Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1243823rdh; Fri, 24 Nov 2023 08:06:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWbzzlz7EKnBb9ZVptL9l0OOIUHbQM4VU+kfj5wvpP9k5y3XngsWWBcNOGWl4ge7kCPQKS X-Received: by 2002:a05:6a00:1d07:b0:6b2:2a2d:7a26 with SMTP id a7-20020a056a001d0700b006b22a2d7a26mr3325971pfx.28.1700841999085; Fri, 24 Nov 2023 08:06:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700841999; cv=none; d=google.com; s=arc-20160816; b=l/LYq2khQhNczJLmavlBF37Bkp6tl5Rn5+f8rXU6NBbPFQ7Q2eHU3JB52gFVha8pwq n/wQjGys+cPxYNg7Stb1GET2mgv/QOP1O3ZwWtQkzni4tC+uqvuyfLVbLWsTzypAqSmB ax0OfFuqUKuMHBMHgCWHj9p+jh86zfafNiERwQXEM0h7Oe3ZD/kHNFLVVw5XWtBbM0go 7bp2fbrw8F0AYMBX81Cy8BR6Np5npBGiEjVjp9sIccxlpLMiTVRFmS7836Dv8QzNbGDw 75hihomPqsDKcq+rM03gSCefvbLplCUaLe7xMl8Ryu8+MGX7XoFLgSglFuDJO6MNDwU/ NH+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:to :from:subject:message-id:dkim-signature; bh=bUNvOqqggWwhAX95ciZIYIHT3LQIMQE0hwKjtYGZUh4=; fh=KUbDYaSaCMqUtJAYZUB7iX+LZDu+CAueTn+Qi3V/AyA=; b=glfBdhajB27T7WY5wnssrh3E2HE11ohiNYAATPElOF/ynJMeNWovqD8n7gTXLsXIAQ CqtTihlVLgZpCH0A3dBcxyT+3p7XPnnLfSL+SclA7tsDr1lDwj4+bdfOcjzGimDk02nj AhAZLigfEEvwn93N0EzaZ5HHWs3AHkS2aBlCoNraAz+nbPA3du5nq6taL3FGQ8dsiWDe aqPTnujd3CAJiNVzO7o8NlaHXBTHbEMGcgdK75wKNDp5QX71rpPsEVv7Us030VkLBp+I l5u5hvHv8tTXKFZIlwkD2t7+0JrLAeJI0Kg7C7UJ5AGnKcNiWuVfjza0XzlG3iCAO4Wu cmJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=cOzuc7OR; spf=pass (google.com: domain of linux-wireless+bounces-52-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-52-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p6-20020a634206000000b0056513361b4fsi3711491pga.741.2023.11.24.08.06.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Nov 2023 08:06:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-52-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=cOzuc7OR; spf=pass (google.com: domain of linux-wireless+bounces-52-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-52-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 80667281182 for ; Fri, 24 Nov 2023 16:06:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB0BF33CD8; Fri, 24 Nov 2023 16:06:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="cOzuc7OR" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B72581B5 for ; Fri, 24 Nov 2023 08:06:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=bUNvOqqggWwhAX95ciZIYIHT3LQIMQE0hwKjtYGZUh4=; t=1700841990; x=1702051590; b=cOzuc7ORs9i9qBOOVPF2ilAYj8Z6qkyjIFeH/O7MW9haTyy h2odeb5G3uuNVtI9tSjODxiS2/gC/5Z/jd4EVyAGzjEMEPn0dRYazmifys2gEKwxbIJiPevR8QFS2 j8ILvdCeTdK6aJrSoVyYATpcOjhyUTAtd9jOs2VQPoCdPYClfaWxLS2/XGDuwrhx9umLdgbwLlmCn ZK84LyJr06JmzqXckyk/t8bCtGJQ3S9zQpJQhW8zxhIOmNLDZohFv9tzQrzyG2akJNBSnNYb5/wW/ 4/sQEEnBp4e/kwjdCui5xJyC15gltU7ftY+5mV0vOlgU/ZVDZlCnp7WrkPBUVxvQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1r6YhI-00000002eO0-1r8X; Fri, 24 Nov 2023 17:06:28 +0100 Message-ID: <4ea5bf5ac1ddd64cfac7802b0c31822d71da7ebb.camel@sipsolutions.net> Subject: Re: WARN_ON(!cbss) at net/mac80211/ibss.c:488 From: Johannes Berg To: Dmitry Antipov , "linux-wireless@vger.kernel.org" Date: Fri, 24 Nov 2023 17:06:27 +0100 In-Reply-To: <1bd8f266-dee0-4d4e-9b50-e22546b55763@yandex.ru> References: <1bd8f266-dee0-4d4e-9b50-e22546b55763@yandex.ru> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Fri, 2023-11-24 at 17:56 +0300, Dmitry Antipov wrote: > I'm trying to investigate a WARN_ON() in subject, seen at least once > with 5.10.200 under syzkaller. Surely this may be a weird artifact of > using the syzkaller itself, but is there a scenario to trigger this > WARN_ON() in a "real" environment? And, looking through the code, is > it a good idea to call 'cfg80211_get_bss()' without checking whether > the corresponding BSSID is non-zero? >=20 I feel like we should probably just remove the WARN_ON()? Seems this is either triggered by a strange CSA request from userspace, or a CSA happening while also leaving the IBSS? ieee80211_ibss_finish_csa() is strangely checking for is_zero_ether_addr(), but I'm not sure how that happens when the state is JOINED? Maybe there's somewhere a check missing that we cannot join an IBSS with all-zeroes BSSID? But I'm not sure how much value there is in digging deep into this ... johannes