Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp714039rdg; Thu, 10 Aug 2023 18:06:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOlxtCAOQFSfpBzKiCtbD5XfR2GzYVzMCVZj/SdMq39iDn+lbQ3KszP5Sua23bBWd05oxF X-Received: by 2002:a17:90b:78d:b0:268:5e70:507c with SMTP id l13-20020a17090b078d00b002685e70507cmr5038400pjz.4.1691715992839; Thu, 10 Aug 2023 18:06:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691715992; cv=none; d=google.com; s=arc-20160816; b=dNRN9yXYQ9rsXNCTE5vXJUazvKh89NdOPS5K4I/lEsvXNheUnjsJ53F+0oME2n0zwq lNcVdzyyMWyQ1IIR81utlKQMkq0jpRzTkzBB6PbTJ6ofz4B/NjATkCwQOq8VETR0rbvU VqZuR3JwJYEe2YaBGNfMh/oBJu1ZLvCK5WxE230csVEwzKCcb5BD3MWU2Wwglprx6hJL ZdfISMR97LAiJr2PI9hFm2imQe9QA7vE7HGZBVPihMsfnVNWDo+cXlddnUrRHshA5Dwl OuopffFg+r/FpVMw5IIQQO3rhQTqCHUEbHnVLVFXKG8JBnnSkeLnm5xD5ycHIVMwGk5L EXqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qsHfJVOQ255YFbZbdUUheUVnDVx8q2jsE3hZBxpZuz8=; fh=Ow4mwMa8YKqUmzHYRD7yQ+Hoi0GpsdtZJnSqTpHEors=; b=ioHlvQAx6oQw6e7UOQ0/TCG8AeWKAGuHF9gUE+dol9mUg/t872bNS5/cWcjFAc/egR m6XymfyuzKQ/vVcGD7ih0vNV6gwAbsabBwudPvAOLXaKU29y/NU5TLNZDt5qwffO3t5/ f100zsDw9DqwjDyOFC3kZRarm6SeLUXpTrw88awC9nZ0cONrlKU89tc40b8vAuRWs5iD bMKto+rM8HD11NYtawZMpBeaNIev1SKRQ1OZUgOw704sh0Y6KlyqAroZR4y9/SVtfTA2 /5wulPzNZjnG++JLJmvw7T4aDwVI9L5C0N+4+90RVcHVy3nw73D0Ns/mxFp4fd+8nCFX viQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=L22cEDO0; 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=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fw7-20020a17090b128700b0025bcbba10c6si2445869pjb.85.2023.08.10.18.06.11; Thu, 10 Aug 2023 18:06:32 -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=@chromium.org header.s=google header.b=L22cEDO0; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229735AbjHJXyS (ORCPT + 55 others); Thu, 10 Aug 2023 19:54:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbjHJXyR (ORCPT ); Thu, 10 Aug 2023 19:54:17 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C30726BC for ; Thu, 10 Aug 2023 16:54:17 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1bbc06f830aso10763415ad.0 for ; Thu, 10 Aug 2023 16:54:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1691711657; x=1692316457; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qsHfJVOQ255YFbZbdUUheUVnDVx8q2jsE3hZBxpZuz8=; b=L22cEDO0syHD/sEkeL2q1R34CGODwNsx+RTNXuZJDipxYXapULA/PGWP+dO+ahlrzc Yy/Vx6mhlucMHXDP5qtT5emGNxqbzfKe5vStBtdvYopCxLEHKLDv91hiCWWEXbQauz0x oaWyOApSpEF8g9WMQouDDjZWomr8WmwFKiNwM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691711657; x=1692316457; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qsHfJVOQ255YFbZbdUUheUVnDVx8q2jsE3hZBxpZuz8=; b=QdwJ8b+Wm/BuEF48eeOk4ALt6hG5Vi3hpwQQCvYfQtcuuIuFad+ObNv8pUHYWc2VY9 HW1l8gO2O3+ulfe1B/ZnR+5e4d9nVcBp/aoHZnZmXZuzldlrV5zOF7YNpRZNP+Ev8uE5 UEQcWsW1CdHMTRRs2jp8BgMVXkcYBNscR4jmrQjKIXd5YWt1JxDGoaT8ggEJsBuKG6BM ITcmJctHJF9AHwKjJoINFL4hscCNIuOHSac1s+WfHNQ2YwpuwREI3Lu4I8msT1DCIn6q Q4+VhUkBm1xAgL0PSHo3occgaSoaPEyFF+YJpSFMfErTXmGuXdzU5D30FJ+YpTydwHuw zqJA== X-Gm-Message-State: AOJu0YxlyMkJr0qByncgh0duCe1s7rgrLO7ZCcAFR+SXitIx7ezhpRfG WIr8l2O8ZjlvhTYYi5bOKA+9PQ== X-Received: by 2002:a17:902:f543:b0:1b8:af5e:853c with SMTP id h3-20020a170902f54300b001b8af5e853cmr570099plf.26.1691711656749; Thu, 10 Aug 2023 16:54:16 -0700 (PDT) Received: from google.com ([2620:15c:9d:2:4ec8:57d8:e207:3679]) by smtp.gmail.com with ESMTPSA id m7-20020a170902768700b001b9be79729csm2349225pll.165.2023.08.10.16.54.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 16:54:16 -0700 (PDT) Date: Thu, 10 Aug 2023 16:54:14 -0700 From: Brian Norris To: Johannes Berg Cc: Polaris Pi , matthewmwang@chromium.org, kuba@kernel.org, kvalo@kernel.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH v8] wifi: mwifiex: Fix OOB and integer underflow when rx packets Message-ID: References: <20230809215817.3080280-1-pinkperfect2021@gmail.com> <4933455600e633c8cbafc0fc3180a7023894f8c9.camel@sipsolutions.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4933455600e633c8cbafc0fc3180a7023894f8c9.camel@sipsolutions.net> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FSL_HELO_FAKE, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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, 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. > > > > Fixes: 2dbaf751b1de ("mwifiex: report received management frames to cfg80211") > > Signed-off-by: Polaris Pi > > --- > > V5: Follow chromeos comments: preserve the original flow of mwifiex_process_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 > > > > Arguably, as Brian also said, that missing return is completely > unrelated and should perhaps be a separate commit? 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. Brian