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 88498233D8E for ; Sat, 9 Nov 2024 10:16:10 +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=1731147370; cv=none; b=emfN9f3z8pVgfehm2KZuGM49BFbyz1/r2SuCW1vbmVs4dWVe+MImEeM30vbuKXbBKQBWPIAGWopG+tRYUj01pWcDdc9r/9H75B413F3wd1MfWs8pTIpzxxAllIoWkf4wkWI2SN61hwKKNSA+RoDEYSuULqp2ji6ioLeeYqd4uhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731147370; c=relaxed/simple; bh=SJpaumpapXp30aVx4tTSTYLNN0dp9I8DYHatea4aiuk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=IxAxmHAvcDxDQZffRgLQxTdYNhPrAMj1IYvJyfFbhx+Y0OvPAJWRRAbfvY/gRKkKfn2g+LByZjqxNBT9YEyDiCN95ef0wwQ9sY9f/OkjRWCSyYu18WvCzdFuSMBwG8dejgNXCJK/bBOtlCw9rSHYjSmDUc/GKf2AVmAlBDS+bLo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=btMWqMxz; 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="btMWqMxz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86104C4CECE; Sat, 9 Nov 2024 10:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731147370; bh=SJpaumpapXp30aVx4tTSTYLNN0dp9I8DYHatea4aiuk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=btMWqMxzcW8dpm7cNVwoDCnfLkEaat/Iij54Lae9Mf3oTqPFOWuFlL8mhf3P8nKxP zz3kZMUqx/9sQo4OzOiBfuge17rcurjJ/ely82+bLNrEEGoDt7FOPX9PbncDCVF2dy l874zDgJjSAh8snIeY5X5vulHUALX7wjJVnzwTMg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50215: nvmet-auth: assign dh_key to NULL after kfree_sensitive Date: Sat, 9 Nov 2024 11:15:23 +0100 Message-ID: <2024110924-CVE-2024-50215-0155@gregkh> X-Mailer: git-send-email 2.47.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=2285; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=SJpaumpapXp30aVx4tTSTYLNN0dp9I8DYHatea4aiuk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn6Zjar5Rf5O3CYOtgrR56+xva/vcDq/vXrzTcixZd2/ 97x4oZzRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykTJ5hwcQX9cGZpi5vHKJj V1RnWAQ8cLuXwbBg+hKVjeosbXf2nlsoZvOlfYboJe6zAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: nvmet-auth: assign dh_key to NULL after kfree_sensitive ctrl->dh_key might be used across multiple calls to nvmet_setup_dhgroup() for the same controller. So it's better to nullify it after release on error path in order to avoid double free later in nvmet_destroy_auth(). Found by Linux Verification Center (linuxtesting.org) with Svace. The Linux kernel CVE team has assigned CVE-2024-50215 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 7a277c37d352 and fixed in 6.1.116 with commit c94e965f7663 Issue introduced in 6.0 with commit 7a277c37d352 and fixed in 6.6.60 with commit c60af16e1d6c Issue introduced in 6.0 with commit 7a277c37d352 and fixed in 6.11.7 with commit e61bd51e4440 Issue introduced in 6.0 with commit 7a277c37d352 and fixed in 6.12-rc6 with commit d2f551b1f72b 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-2024-50215 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/c94e965f766321641ec38e4eece9ce8884543244 https://git.kernel.org/stable/c/c60af16e1d6cc2237d58336546d6adfc067b6b8f https://git.kernel.org/stable/c/e61bd51e44409495d75847e9230736593e4c8710 https://git.kernel.org/stable/c/d2f551b1f72b4c508ab9298419f6feadc3b5d791