Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp634608lqh; Thu, 28 Mar 2024 11:29:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUk/Jnx49CYDuJX+JdrbjTiAh/Zkxx0Gj6uxBM35k/KYq5XoUuXAxT1kkLGcivHQJYSZ3Y+lEi66vJ4JCM9y18i+qHl4jxsEd3i3awFTQ== X-Google-Smtp-Source: AGHT+IHRq2vGIv14ee239ZRVHQdireKX2UBIZNuiySUXKDO44KA/s6kQlNGhrgnLwc9YxQcd74P2 X-Received: by 2002:a17:906:d054:b0:a4e:233b:e470 with SMTP id bo20-20020a170906d05400b00a4e233be470mr37443ejb.53.1711650557629; Thu, 28 Mar 2024 11:29:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711650557; cv=pass; d=google.com; s=arc-20160816; b=fjhorO1DcH3G/hCco3cGfaP0CBVPwz4oS99gL5+tHRtNPyOSVDaXGoPn/SU8/heFbO 4y6yLHf3AcJhyiTVCUo1lGgVsqtTt2ySJnsJm3Qh5x0xJm7iWoq3DBaXX82GbWlwF2on Sj0hOEV2Wa7WOaUxnrVsrzWeLCkpz54C8ify84o8OTXjc/3ZZ/X/+jqjWu75d3cglEq2 ssJWAwJiXdWjnF/DOaeCza5KbQboickuqP/VOvjEctUlWXzXL6ZvZ4u4RI1FY1wskkEe iU218jUVaL9IaST7Xqh4AoEW2H4cnr0XrPtYHEjOdqTEeF4q7uR9rb8vTe/xPykGcRFv afYQ== ARC-Message-Signature: i=2; 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:cc :to:from:subject:message-id:dkim-signature; bh=Os7iyALeJRu+Egif75ri/2HcOX0TV1ifT7zdnaFb2TM=; fh=YNY9KyjdbQqNM0XZgeD0KmAMgX9BpAUuWRaeelzxR8s=; b=lRUsJ83CMAxNwR/3fbSQ2lL/Ty4WHJSg9Bfu5f5iXgOtkP2bVVjzIheb8H+obfB5I5 9edaIjmmGv2IZHbbAEbO6Hta/QW1+aYfjFm5OVLz/r43YeXs9Zk63Sqze/Au7JBUo4DA OusA6N9Djlhfb+5Y/Wcw65yNTgwxZXBZK63Lt6yKkZ6oRuXAmkiRXc5UnvXO9MlIaVOS AXXfckFSqNxrxp17C/+9A7DMly2X6t64/T97ih2Vcfw5uUMB/+Jv0LSw/u+q2lDArkN7 1SmPatDjGz+qheiis0C2wmRstDBJ1TaUzGSmVMhIlysBWX7Y3RXnK9icTDXjG0yoPmLL a/8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=fiptjXpb; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-5489-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5489-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t2-20020a1709060c4200b00a46c1dc0b13si954079ejf.216.2024.03.28.11.29.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 11:29:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5489-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=fiptjXpb; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-5489-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5489-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5CF611F24289 for ; Thu, 28 Mar 2024 18:29:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 255F742AA1; Thu, 28 Mar 2024 18:28:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="fiptjXpb" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83B503BBDC for ; Thu, 28 Mar 2024 18:28:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711650538; cv=none; b=FpaUFWr7FfLONcEHYTVaTad3Ozgh5LG+FygT1OtUr0Zw1Ifc2AhxFiAatzZjtHhRg8U2YjyKPNhmouTcDsmHHpulgXmRYYFydZZBDI1EruykCaPz8cqyUkCEM0fk3cgBZN3O+wfOlZNlIkgj7c5sGOjsfHIuND3XAVM/xhgznVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711650538; c=relaxed/simple; bh=Os7iyALeJRu+Egif75ri/2HcOX0TV1ifT7zdnaFb2TM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=jPDoIxwAGTe49LOmgmIpwaCZXq7jnTuXyhxygTi0DszrcmvEAUvLLqlyEA49xBKMTSPI5XNOeVREUClJIYY0BWmAh3TZTudapNHb+CFPPAyY3NlZnbpoupDtZhcq95odx1o2irCLLGaavOF9tGxvAznzAFRcOd+F2K76JV3IU5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=fiptjXpb; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net 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:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=Os7iyALeJRu+Egif75ri/2HcOX0TV1ifT7zdnaFb2TM=; t=1711650536; x=1712860136; b=fiptjXpbx4HGSaw3SljP0ZlMZCquzCK6yh1V2HUkW4wyq86 r4ONyeM1JLpnn/MVS7714wsHr+LgKbn+FrGi1lkcjB+lRgfTfn8BcfcNXH92rnr7uog5imYisuJZv hp17yocvDkuPJLeC8PSW9fkrua+6ffy023+TtO7XetUhE4BEI4c6QaACAYUQUzqZJ3BX/h6TOBCqX JV9fsdpy1YiJM+qJQGzQ8OE9fMeNvhz6zRN0eCLmhy2dzztIjP0PYsE2gNwsSf6AC7d0pe9oktX6J 5KnXGCZqqJwfjksV9mclAYTym8D2i6xKsg/Z3/SLVBg8SGyaANXx8x35vebQKEVQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rpuUg-00000001DvG-1EWo; Thu, 28 Mar 2024 19:28:54 +0100 Message-ID: <3009b152cd9f95065860d2de6b7ff8ee5775e579.camel@sipsolutions.net> Subject: Re: [PATCH] wifi: mac80211: ensure beacon is non-S1G prior to extracting the beacon timestamp field From: Johannes Berg To: Richard Kinder Cc: linux-wireless@vger.kernel.org Date: Thu, 28 Mar 2024 19:28:53 +0100 In-Reply-To: <20240328005725.85355-1-richard.kinder@gmail.com> References: <20240328005725.85355-1-richard.kinder@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) 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 Thu, 2024-03-28 at 11:57 +1100, Richard Kinder wrote: > Logic inside ieee80211_rx_mgmt_beacon accesses the > mgmt->u.beacon.timestamp field without first checking whether the beacon > received is non-S1G format. >=20 > Fix the problem by checking the beacon is non-S1G format to avoid access > of the mgmt->u.beacon.timestamp field. Huh, how did that end up being a problem, since iwlmvm with older devices is the only driver using that flag, and it doesn't support S1G? It's still correct, but it shouldn't be a problem now? johannes