Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp888620rdh; Thu, 26 Oct 2023 20:43:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHIWyMSh6MQajnGrHcS4nPzECd6//fYdxLe7yzRL18jNiwk3u/mVrcOh4TEN41R7CsHvfjU X-Received: by 2002:a81:af03:0:b0:5a7:bb95:681c with SMTP id n3-20020a81af03000000b005a7bb95681cmr1639046ywh.36.1698378204382; Thu, 26 Oct 2023 20:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698378204; cv=none; d=google.com; s=arc-20160816; b=hOkah6UOXd0E5C9TGv9K832jxtx/HwJlqe6ZbwW8D0TDrgXB/eixaIlkTLBIV7yqOC gPIU0R+vKOU+hPO6RCyp9s3UOegzpYqPddXJeriBHt4uDDxiTROazuKy28xZoEbkrHPN qL0FFBBTwHKYx7oEbC+Qyt2zWnJuJzS1C9G+4GRjpjfECrAzmiaX5vOEws5DgFgRT2PB JcNvUCen0eZVUsmbL5jELYzlrhM30tE3ampc0aFXMmw5WbNdj2v4M4sp1sHLlNQRQqT3 FdeMhDAuTEpC6VQIdhksP5MFJ071eG47jcpbZVENoEfGrGeOrKDw48iHVppeEm82vJ8o kuNw== 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 :dkim-signature; bh=y/stKboTHsqJvzjY1OwTwMJdw+f8rbvk9J6LcpLr6UU=; fh=3VXrOGkwnVn2bhfYM8XwcpbeYcpmHPtxojJstliuswI=; b=zCriSSXAZxT4OVFqUBOmrnWO2nNuVSC+To9BxqxjKWurp1/gu+I8bMFTmQcFSgZlQc +wna0xMyC7fltqbRgVBX8B6RMx9Sji6FzZevz5Kp/0rm7qlTYe5TCAtx/QvTh/TnnLG3 0WSSuWlmXe66NDAqRzleLc9a7B4WrnWhrs4OMEWYkafSvHFDU3OECUSd6N9Z2Ck4Wbha SluA+PwlSvczDvlobcyFbgMNp1CsBkUfzq2qQUbgt3NSgLGIpIQGA5b4d2zFqJ+cpQz2 zyMwy4egCpEkz0WVMIoUMJQS8BKWBiM0o606HS9V0qvo/Mce2jJGuD3Af+2TcKYHzrr2 yT7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=kUPs8Cfx; dkim=pass header.i=@codewreck.org header.s=2 header.b=vWOyKBsb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id g200-20020a0dddd1000000b005a7d0b5e17dsi1311661ywe.422.2023.10.26.20.43.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 20:43:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@codewreck.org header.s=2 header.b=kUPs8Cfx; dkim=pass header.i=@codewreck.org header.s=2 header.b=vWOyKBsb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=codewreck.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D49388023927; Thu, 26 Oct 2023 20:43:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345255AbjJ0Dmt (ORCPT + 99 others); Thu, 26 Oct 2023 23:42:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbjJ0Dmr (ORCPT ); Thu, 26 Oct 2023 23:42:47 -0400 Received: from nautica.notk.org (ipv6.notk.org [IPv6:2001:41d0:1:7a93::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70296198; Thu, 26 Oct 2023 20:42:44 -0700 (PDT) Received: by nautica.notk.org (Postfix, from userid 108) id 07C80C01E; Fri, 27 Oct 2023 05:42:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1698378163; bh=y/stKboTHsqJvzjY1OwTwMJdw+f8rbvk9J6LcpLr6UU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kUPs8CfxjRy09gs9qkYmju40mDPmRi/8yto+SiQgkWhws33HqZHRnnP6UjuwMWiuv Dx+08ivcRiDjWFQd/jZOkvrUwm8Zf6KE1XJbPWFcZKXTW8SxtE8ECsmXespH0q1iY9 XG4FMDiolos5EQNlDwKpU3NCFkZrxwdLKMmfVFNXMGQhk99BOCEF+kVaMIq782WSAW YcPliQaNFF0CnOlJkR7ytxGlu+5NXWKAlNddYCRIGcRyo2jqSJT4p/lou9C5ufCBwR 1XfoAvQxFF3+o9Tr7hkZecTwZ4cmh6pEvkXxTf3fBp4RbSAfFLSUChu3yQO9dmK/0W JDmISjL96uQNw== X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from gaia (localhost [127.0.0.1]) by nautica.notk.org (Postfix) with ESMTPS id 0FF59C01C; Fri, 27 Oct 2023 05:42:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1698378153; bh=y/stKboTHsqJvzjY1OwTwMJdw+f8rbvk9J6LcpLr6UU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=vWOyKBsbrYQrkIY/uefLXDTy9INAUqZ80ozwYs2+VHqm+z83mgSc1sUXTRElVGL+A gxpPCD70lUe4oSl8OV/M9nl7N3QF5ZJ6PhKBv3t8h3Tx5ZmTNRmGtVhO+5NJtQXgQ4 0bKf4Rvh5f6MVkbtNK1lfJnu1CImdNnQyj7c18htDjUCCxbRD0JvgPouD+OgfJVeEo wzkgyFz4LqqeMKRz9h2p4PgobvydqO7IsNeBX7K9PJEaa0jOIUeIOhQNQr/CH3u8TH 3IBinzTzzIUe1jr5Qva9YTtJGsHJqRW9CuIrVhVcju75474whsgzHl01zttE2Vgk8r Yq5OVgKWErc8Q== Received: from localhost (gaia [local]) by gaia (OpenSMTPD) with ESMTPA id 5ab81bb3; Fri, 27 Oct 2023 03:42:26 +0000 (UTC) Date: Fri, 27 Oct 2023 12:42:11 +0900 From: asmadeus@codewreck.org To: Hangyu Hua Cc: ericvh@kernel.org, lucho@ionkov.net, linux_oss@crudebyte.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, v9fs@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] net: 9p: fix possible memory leak in p9_check_errors() Message-ID: References: <20231027030302.11927-1-hbh25y@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231027030302.11927-1-hbh25y@gmail.com> 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 (howler.vger.email [0.0.0.0]); Thu, 26 Oct 2023 20:43:06 -0700 (PDT) Hangyu Hua wrote on Fri, Oct 27, 2023 at 11:03:02AM +0800: > When p9pdu_readf() is called with "s?d" attribute, it allocates a pointer > that will store a string. But when p9pdu_readf() fails while handling "d" > then this pointer will not be freed in p9_check_errors(). > > Fixes: 51a87c552dfd ("9p: rework client code to use new protocol support functions") > Reviewed-by: Christian Schoenebeck > Signed-off-by: Hangyu Hua Thanks, pushed for next -- Dominique Martinet | Asmadeus