Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp5733721rwb; Tue, 1 Aug 2023 07:14:27 -0700 (PDT) X-Google-Smtp-Source: APBJJlHZ4dOysnAR87RTSvu/dAxC7NqazCmLR2G27a9MOUty/BEtvMRsLV39+rCnXmQgMpu1lRJ+ X-Received: by 2002:a17:906:2092:b0:99b:c0f0:77fe with SMTP id 18-20020a170906209200b0099bc0f077femr2681445ejq.69.1690899267070; Tue, 01 Aug 2023 07:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690899267; cv=none; d=google.com; s=arc-20160816; b=0ILmd1R3nLxJxpd3XodGe0x52Jspmn+5CHz4XQ5hjzYBhNq8fei6Rez1EsF0scRVMc al4K+HOUDEFP8onAvdj1W8OjIar/mdKJ+tgvvPe5DsnQ8j6OzEHW6xkfJNJY2EfpzYMj syxs++Euq8PocktQRQiWPmOmYgRFQIWlWb8aeg3j754bKdKdygJA96pB6vc0CqRPAEku +ER4CZLCwtPbh/5IjUa6Qde7CvMAyibMt45iOvHvGCCqD8w/Sd5TmN60T1zZ7pGYv3Mx EAFXvKRwW4DqWI2Bi/VZTs4/37oK1kVM15xDxBf43wBZ/9p4NrMO0k0oRnMAcMASFnwe xh7Q== 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:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=KOqW7D7khjwhtv/SmvdooWaIaKC46ti5pTUHYzMmeqc=; fh=HByH4kpDkildgdSbmkjug2ic4H8gJnIo2i9K3xNihmc=; b=qipE7FOLA21fAonL8uA6Qj1SGL0rXzW15Sqw3pugI/p76DLHOqkHieL5X7S42SpTC/ czeKNp48ZBUS26Yg41a2XROec3q2gYRdX5RHTqZwmWIf/vUjXwV0GC+bnqw5a1fMc55K Q8tiyL1hiXsh/2uoj8jfMUUJHdpdrfkYT2sAi3EEYz8YWVCFhAwt/gTSg0zLOnOtzu2/ xyPoe0evannscvMqeI2TQ2IMvVUmYy9teCyN+Bo7uhB5LcOFi+uk00YTt9+qWDHr/E4P yRexMJHdPxcYU+xZxob31Dm0dSA7rEW0syTa+9CemDe6ccIz+OIN8dtccZEPA53Aui5Q WoZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BElcm7HG; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk20-20020a170907767400b00987dc76f82fsi4152629ejc.285.2023.08.01.07.14.12; Tue, 01 Aug 2023 07:14:27 -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=@kernel.org header.s=k20201202 header.b=BElcm7HG; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231712AbjHANwn (ORCPT + 59 others); Tue, 1 Aug 2023 09:52:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229800AbjHANwm (ORCPT ); Tue, 1 Aug 2023 09:52:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 329C8ED for ; Tue, 1 Aug 2023 06:52:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BC105615AF for ; Tue, 1 Aug 2023 13:52:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B1F6C433C7; Tue, 1 Aug 2023 13:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690897960; bh=GtyRiFHthsDjtKkiPp/i8BU3l3WVaTFcYHgdGtnnWJg=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=BElcm7HGDPmhq3g+fa/Lz8p4qtc1eSd18g7VJJZB+v0Swv83UFY1O3wLsD/wXY9E/ kAgk/cL0xT+eSswB7xru01PwcXBYb0Uk7TWd92B8PFgxTxS8IPWv+2U5tVtLCwUwlI pif0jnoSIJSnan49WSToXy7REI7ueF8bpRE9O2CiioLzLFEJYPBz8e0CiLrhZxfSOm 7jDI5oMzqZlUt514Qi4g5LxzSOsyLulApU4Vhd1NNolyUbd1HbetkWjcMDUd9ukJVS 8M1yPcagu+ZDhSTT+05XPBVPMTERHwGP7vcg3mAWJUinvIalX0vo2TZwWVOajfWvfv loNNLtfl53eGg== From: Kalle Valo To: Wen Gong Cc: , Subject: Re: [PATCH] ath12k: Fix a NULL pointer dereference in ath12k_mac_op_hw_scan() References: <20230726092625.3350-1-quic_wgong@quicinc.com> Date: Tue, 01 Aug 2023 16:52:37 +0300 In-Reply-To: <20230726092625.3350-1-quic_wgong@quicinc.com> (Wen Gong's message of "Wed, 26 Jul 2023 05:26:25 -0400") Message-ID: <87fs52yimy.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Wen Gong writes: > In ath12k_mac_op_hw_scan(), the return value of kzalloc() is directly > used in memcpy(), which may lead to a NULL pointer dereference on > failure of kzalloc(). > > Fix this bug by adding a check of arg.extraie.ptr. "wifi:" missing from subject. > Tested-on: WCN7850 hw2.0 PCI > WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 This on one line. I can fix both of these in the pending branch. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches