Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2250942rdb; Mon, 9 Oct 2023 19:33:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH4MyNm5e0IBX6yul5RtIhe0iHzPdRpbfhBNsaotdMcWlKzfGbKUQ3Sy/M+BNPQuZhfiIss X-Received: by 2002:a25:d650:0:b0:bfe:e383:6297 with SMTP id n77-20020a25d650000000b00bfee3836297mr16722084ybg.19.1696905213533; Mon, 09 Oct 2023 19:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696905213; cv=none; d=google.com; s=arc-20160816; b=TW00F8qDXPJ2r+S+KDJP+aMj8BthFGOlYOchP+5+QGtmSriBajKCwgfjfYF984BPv8 rkyJ5vcTum4pk/NKNEev9LfR0RQFecFDMASBGU0ws7X8EUMnDBuOrAPPHjC9YROgI6mj pKUauqF4UM8PbhPw+/ZvtfT4jkKMkH7vI5UsUzZiNI85aB0TAk7rpdFRfB18gK0y7Nud Id25kbj9wmZqZnudR06qYWa+TG32KEvZ2AXwfx3iM8CPFW55flMBpr4JM8uQ9s9j3yz2 /8VJ046Ym1oo5uxtacFAUhQ3by6/1A7rqLyR1LoY658X1EhOwhhO3VrXlGM7oqoFKCeU s53g== 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=ETRjUoAmw2wzZjChpit8xm2ZjWOk2dVagVyPCB7RLug=; fh=BYAL5wRUddfQnVFZUzz9WzEB7t4DxnsCF1VZyiY2n6Q=; b=TXq7L8W2DC2byslKqEAPEE6R148ZfiISeU3cUTP6o/aycNUnrP/JNPIOcngjBvDFnN x6TYcxLnhF45DBqnD8zRYe+yxoRIEXclYBIGswWp7pF42D+hbsk4zx4w253YI55LAyP6 P6jAx9OAZuKBqXL+LA3gz7vYRX+wgy5h30n5C/7It2S+h7DldhlYMOBhx935rOd/jSvp ehN6X8xwn2RwBuKjxIQMlmSt6n+cVEswyKpXsPs0wa//lttHTN54mYqmvhXd0+7KSSMh 4OtzExxgmaGqTgmJCuO/lEFCHuy1SRrGREEPoyk6pqSQrok2poC3wcO3p/lx6Ji14scA F/Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NTEGWxrt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id k3-20020a633d03000000b00578bab760desi8600723pga.278.2023.10.09.19.33.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 19:33:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NTEGWxrt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 2AA6B81FAD88; Mon, 9 Oct 2023 19:33:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1441892AbjJJCdZ (ORCPT + 99 others); Mon, 9 Oct 2023 22:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1441893AbjJJCdY (ORCPT ); Mon, 9 Oct 2023 22:33:24 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50038B8 for ; Mon, 9 Oct 2023 19:33:23 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B2E3C433C7; Tue, 10 Oct 2023 02:33:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696905203; bh=wEYcgGQVtUTfORpCNvBb2la3+23xg1zdIxa3uz8FPw0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NTEGWxrtzeaVft2cUpn0DSaTYOm+quKuWCcoElJ+3j2DCvUGimykhc4A9n0Ic0m6M oeK6PVYnQvOLPCWgA5P4ssiCik7SY51DO+1ISnRGhGh5oIBpV0bkEYZPm8eLGaiB+1 M46ZdhTNdiO8K8yEFrwO12MnrCblWEnOTcSbua0sS0QSuEszLLidgsF3dj1eprbeax nZ4QURgBYfzlG0zzzABOnSP+wVpI4Rz5xxLLu4CGsSKgV1FgyWwWsQkOrWcq7aBv4s 47ljqGsf0buCMY5Rn99z0iqdsdoAIo+rjsMMwpq6NapZy+gKjR/MQL8xXPN/Yc8ywS olZNh1oxm+Dbw== Date: Tue, 10 Oct 2023 10:33:08 +0800 From: Shawn Guo To: Hao Ge Cc: s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, christophe.jaillet@wanadoo.fr, robh@kernel.org, treding@nvidia.com, daniel.baluta@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, gehao618@163.com Subject: Re: [PATCH] firmware/imx-dsp: Fix use_after_free in imx_dsp_setup_channels() Message-ID: <20231010023308.GM819755@dragon> References: <20231008032908.11448-1-gehao@kylinos.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231008032908.11448-1-gehao@kylinos.cn> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 09 Oct 2023 19:33:31 -0700 (PDT) X-Spam-Level: ** On Sun, Oct 08, 2023 at 11:29:08AM +0800, Hao Ge wrote: > dsp_chan->name and chan_name points to same block of memory, > because dev_err still needs to be used it,so we need free > it's memory after use to avoid use_after_free. > > Fixes: e527adfb9b7d ("firmware: imx-dsp: Fix an error handling path in imx_dsp_setup_channels()") > Signed-off-by: Hao Ge Applied, thanks!