Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp886133rdg; Fri, 11 Aug 2023 03:11:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxCd/+UccFdsn/HbQu4ljC3AdpytccWd6eozfpacUm/VKV6gPJRfJ/PgVf6JCKfUpfzdRs X-Received: by 2002:a17:906:738a:b0:993:da87:1c81 with SMTP id f10-20020a170906738a00b00993da871c81mr1727633ejl.20.1691748711443; Fri, 11 Aug 2023 03:11:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691748711; cv=none; d=google.com; s=arc-20160816; b=sgRsEjuEcccj0gbuG4BYGg6EpBTQpORsIXdiTMTQya5kEbZsWqf4uod4bjEUFc4Sgr jSH69gZ9/iXUcV/NpuyoQdV/53VFnRg2VMChgNMcBNPXSgJ6PWBJt1UIM478FLlbEf72 azPFSD3EKc4a5iAsCYr9BUQbFRLSjjf03vYfwKcJanW0ig9arON6gcbgGnYbpLarSdq5 wTMli28Gol/agEjGKGHRa/WBU7LQBdJl1RQ2dsC/5pZQzaTS7vppbZdc5CGDmJAyUa29 Qxzc2qViXt8zR/WJEy5i6RkXovqDfo3FvaP95Dr4Q370zxJvFglpUq6m2NDq6TD0dOy2 dmMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=sFnYbfoX8sDJndsar1nb384O4i3Hyi1qGT2KuRLKEEE=; fh=aOeZeELIpSoKX1gFYH6U7Q36nt2HVmv9v1Ku2KaIDQE=; b=qrCZKvVrWh5Gjud5QxSdh+4ig0e9SGw437dCjIanvMQTyYR2WqnwBg9wn9meguoOuM 394gzeXKRQmndmPmGVAAqgU0RYBL1Ebk8cTaR8jAgkitTP/Ec4ySTjgYJxzX6SF5aIV1 9NBTS8p2ANBqH1A0UWnogIu1/6LbDbI+k6BEUZu7wEacGeyDfIen0rtl3z2DaMykwbue 8wTZ2cjXXpqQIaRRFjPUUgT2eHgPFJmvgWOY/mPzD8mXL/V9mqPoYYTGOMSxBcXAHgjM ovD85gsodO1y/5Q1s0Mu/he+Nh3Tiq4TfkNrmVvgM4LCL4OSa2wm38NE3BqD1FoZGWsg VBHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=W2RyH1hG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h23-20020a170906719700b0099d0033ab14si3440594ejk.1012.2023.08.11.03.11.34; Fri, 11 Aug 2023 03:11:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=W2RyH1hG; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233556AbjHKKCU (ORCPT + 55 others); Fri, 11 Aug 2023 06:02:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232046AbjHKKCT (ORCPT ); Fri, 11 Aug 2023 06:02:19 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D0032723 for ; Fri, 11 Aug 2023 03:02:18 -0700 (PDT) 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=sFnYbfoX8sDJndsar1nb384O4i3Hyi1qGT2KuRLKEEE=; t=1691748139; x=1692957739; b=W2RyH1hG0BKpZYgqcZ7b73W6gVqoGirO8/yPmqUMhyIjtEJ /sqzljw0Iom4ibEhrXow3oYDSqmjwOdrFBd9O5ArYNl4ZAg2hCvHQXqLI2bQfHZN4MUx7G7jzJHbk W/hIw1wDc2BBXgglhpiu8AqjZUW4StLCuYVFVhebbxh2uA+c2aLJcWAFuLv6o4kHX1Xoq5zaqqOX0 Namhx4B8Zj13bII0VAOr29BytnnOCNCrrkoDMdnh7rRSwJTFXJAN2O47lUWddtilxwAXkonRacSb7 33rUE6R4v22zCbxYvkUoSgjQva9Qluzi8GcZVFmLTw/aFgtN0KE4KP2IeF6+mjBA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1qUOyF-000rml-2d; Fri, 11 Aug 2023 12:02:16 +0200 Message-ID: <107da8d2ff2610d14cae36124d24fd55eaee469b.camel@sipsolutions.net> Subject: Re: [PATCH v8] wifi: mwifiex: Fix OOB and integer underflow when rx packets From: Johannes Berg To: Brian Norris Cc: Polaris Pi , matthewmwang@chromium.org, kuba@kernel.org, kvalo@kernel.org, linux-wireless@vger.kernel.org Date: Fri, 11 Aug 2023 12:02:14 +0200 In-Reply-To: References: <20230809215817.3080280-1-pinkperfect2021@gmail.com> <4933455600e633c8cbafc0fc3180a7023894f8c9.camel@sipsolutions.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 2023-08-10 at 16:54 -0700, Brian Norris wrote: > On Thu, Aug 10, 2023 at 09:32:57AM +0200, Johannes Berg wrote: > > On Wed, 2023-08-09 at 21:58 +0000, Polaris Pi wrote: > > > Make sure mwifiex_process_mgmt_packet, > > > mwifiex_process_sta_rx_packet and mwifiex_process_uap_rx_packet, > > > mwifiex_uap_queue_bridged_pkt and mwifiex_process_rx_packet > > > not out-of-bounds access the skb->data buffer. > > >=20 > > > Fixes: 2dbaf751b1de ("mwifiex: report received management frames to c= fg80211") > > > Signed-off-by: Polaris Pi > > > --- > > > V5: Follow chromeos comments: preserve the original flow of mwifiex_p= rocess_uap_rx_packet > > > V6: Simplify check in mwifiex_process_uap_rx_packet > > > V7: Fix drop packets issue when auotest V6, now pass manual and auto = tests > > > V8: Fix missing return after free skb > > >=20 > >=20 > > Arguably, as Brian also said, that missing return is completely > > unrelated and should perhaps be a separate commit? >=20 > I think the key here is that Polaris's buggy patch has already been > applied, so this v8 doesn't really work. He has since submitted a proper > fixup patch that applies appropriately, and I've Ack'd that. >=20 Right, sorry, I missed that, was looking only at wireless, not wireless- next. Thanks all, I'll leave the -next patches for Kalle though :) johannes