Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E6271EA7D6 for ; Thu, 1 May 2025 14:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108865; cv=none; b=AC5bvz9orRbOC6Owm4dKQg+YbtDjrTtG/XrtIeHA1h8nRutfRbqBdubIwORkW3ycRaneqzTywe0o8JEeX6J24LD5P3+AdZHFO9e+tskiRrqxdMMuXiokYlraCt80Wz1ztwWQ1HRtGdukGCqvzYmWDs4Grm9lf0SPOwizXhht5aM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746108865; c=relaxed/simple; bh=Sjm1MTHrZ0RO78/n47wW9BRz9RWo3wq1wl334bRageA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ViWoXwYBVgDm8t9YLIneTKo7LBeDdIcYI+hyNlB0iKQDzNZqIGwJjevaf2Q8BUZIk5e7LQjo6wigW2OJxPGpi6BNV1yVkIoe3ix0aUDSzPnRuRHVh3r0nlBnMkCFrWYwo2jT5mIBEnjI3Ls2lTX6kZNI+hYIwiA+mAgJgIjcIww= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kLnD9YiC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="kLnD9YiC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 969DEC4CEE3; Thu, 1 May 2025 14:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746108865; bh=Sjm1MTHrZ0RO78/n47wW9BRz9RWo3wq1wl334bRageA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kLnD9YiCf37XK7Qmh5PMJlK/TbZUZyEZY+tqDv2+mzfh0BgDoMjcQigyuyUsxW6/j 9yDhAn/Rx2tnSdCnWgSIVQfWJX2vWf72faJ1NwOrRH4gRh0tskWwP3XXz6FtalULpE tL9Q3OYUuZWSRgGp2vCKvSJdb2oeFFaxMgGTicqo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49807: nvmet: fix a memory leak in nvmet_auth_set_key Date: Thu, 1 May 2025 16:09:57 +0200 Message-ID: <2025050128-CVE-2022-49807-c7d8@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2556; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ssJ0mGjnXQgWfebwsK3X6e4bYLr/jCuBHewfogRQb74=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnCDTPynQx4JA+XXJY+1ypmpX/6882YNI29By/Vzua8y Nze0GzeEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABP5e41hwYoo803v3bn7rhdz 588+J9JitFZtM8OCXZEqp9ZMtAven5u2sPjFCYWpnRH2AA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: nvmet: fix a memory leak in nvmet_auth_set_key When changing dhchap secrets we need to release the old secrets as well. kmemleak complaint: -- unreferenced object 0xffff8c7f44ed8180 (size 64): comm "check", pid 7304, jiffies 4295686133 (age 72034.246s) hex dump (first 32 bytes): 44 48 48 43 2d 31 3a 30 30 3a 4c 64 4c 4f 64 71 DHHC-1:00:LdLOdq 79 56 69 67 77 48 55 32 6d 5a 59 4c 7a 35 59 38 yVigwHU2mZYLz5Y8 backtrace: [<00000000b6fc5071>] kstrdup+0x2e/0x60 [<00000000f0f4633f>] 0xffffffffc0e07ee6 [<0000000053006c05>] 0xffffffffc0dff783 [<00000000419ae922>] configfs_write_iter+0xb1/0x120 [<000000008183c424>] vfs_write+0x2be/0x3c0 [<000000009005a2a5>] ksys_write+0x5f/0xe0 [<00000000cd495c89>] do_syscall_64+0x38/0x90 [<00000000f2a84ac5>] entry_SYSCALL_64_after_hwframe+0x63/0xcd The Linux kernel CVE team has assigned CVE-2022-49807 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit db1312dd95488b5e6ff362ff66fcf953a46b1821 and fixed in 6.0.10 with commit 65710ea51d4a185592c7b14c9e33d0c4a364f074 Issue introduced in 6.0 with commit db1312dd95488b5e6ff362ff66fcf953a46b1821 and fixed in 6.1 with commit 0a52566279b4ee65ecd2503d7b7342851f84755c Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2022-49807 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/nvme/target/auth.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/65710ea51d4a185592c7b14c9e33d0c4a364f074 https://git.kernel.org/stable/c/0a52566279b4ee65ecd2503d7b7342851f84755c