From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF098E7C4E2 for ; Wed, 4 Oct 2023 17:32:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243434AbjJDRcc (ORCPT ); Wed, 4 Oct 2023 13:32:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243433AbjJDRcc (ORCPT ); Wed, 4 Oct 2023 13:32:32 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46BEDA6 for ; Wed, 4 Oct 2023 10:32:29 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21561C433C9; Wed, 4 Oct 2023 17:32:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696440748; bh=W9hkSL3Mou8wKa/FxxQNX9QCvyVPYGZ0u/8FwzlXasI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QXYPi9UjTP8PQ8stedo0wU9LxoUWM/fYZ+QMZC5fnRES7C46Ds0UCkChL6u0fzOGY f1SrEOHO7JjYa8G2kB+cP6U9bs0LKNsWbdCzek0Jd5hz6E+YglF4wPM/zm7W6DVo9o /eAzzwyKgocWEhMM9oG+dKUpf7vo5Deij8A+c3yDi2oud8SA3vF2oRrJSi1NzEykqZ kmx0QwgWAzGefulqKuoFFx0iwyUgiMKIUyZf1dLdbmU8ojtFUdSHtj6DeISva7OXiQ rxXIemlrwAxQP4EU3FvtxaXBM1REHqj3ndvf51Z6DtIepweA2nmVBU5Tk7UlvNPqJO Y7WL9ZzloeJWw== From: SeongJae Park To: Sagi Grimberg Cc: Greg KH , sj@kernel.org, linux-nvme@lists.infradead.org, Christoph Hellwig , Keith Busch , Chaitanya Kulkarni , zahavi.alon@gmail.com, stable@vger.kernel.org Subject: Re: [PATCH] nvmet-tcp: Fix a possible UAF in queue intialization setup Date: Wed, 4 Oct 2023 17:32:26 +0000 Message-Id: <20231004173226.5992-1-sj@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <01901640-fc6d-5d15-3aa0-9f4586ba5141@grimberg.me> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Wed, 4 Oct 2023 16:25:13 +0300 Sagi Grimberg wrote: > > >>> Hello, > >>> > >>> On Mon, 2 Oct 2023 13:54:28 +0300 Sagi Grimberg wrote: > >>> > >>>> From Alon: > >>>> "Due to a logical bug in the NVMe-oF/TCP subsystem in the Linux kernel, > >>>> a malicious user can cause a UAF and a double free, which may lead to > >>>> RCE (may also lead to an LPE in case the attacker already has local > >>>> privileges)." > >>>> > >>>> Hence, when a queue initialization fails after the ahash requests are > >>>> allocated, it is guaranteed that the queue removal async work will be > >>>> called, hence leave the deallocation to the queue removal. > >>>> > >>>> Also, be extra careful not to continue processing the socket, so set > >>>> queue rcv_state to NVMET_TCP_RECV_ERR upon a socket error. > >>>> > >>>> Reported-by: Alon Zahavi > >>>> Tested-by: Alon Zahavi > >>>> Signed-off-by: Sagi Grimberg > >>> > >>> Would it be better to add Fixes: and Cc: stable lines? > >> > >> This issue existed since the introduction of the driver, I am not sure > >> it applies cleanly that far back... Based on the rule[1], I think people who need this fix on the old kernel would do that. I'd just say adding Fixes: would help it, so better than nothing. [1] https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > >> > >> I figured that the description and Reported-by tag will trigger stable > >> kernel pick up... > > > > > > > > This is not the correct way to submit patches for inclusion in the > > stable kernel tree. Please read: > > https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html > > for how to do this properly. > > > > > > I could have sworn to have seen patches that did not have stable CCd > nor a Fixes tag and was picked up for stable kernels :) I could also swear. Stable kernel maintainers are great at finding fixes on their own. But I think adding those could help them avoiding any mistake, and therefore better than nothing, again. > But I guess those were either hallucinations or someone sending patches > to stable... > > I can resend with CC to stable. Thank you :) Thanks, SJ > > Thanks. > >