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 353EC21C185 for ; Thu, 8 May 2025 06:41:04 +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=1746686465; cv=none; b=oJxJwdFuPnGQ3pn59V8S/AKqsO+XToqUQIBf9KXwF68sj9v4mklDKYQsdFzE6yBdz+xqbpMQ3HeIIXRgqjQCdkj8rr413goWmngjFe1difTO0KnWSE786vXOjJpQi4b5wRD/EwKQwV1WUE9M3QsXcizYwZxKoFCts29F5ASX46k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746686465; c=relaxed/simple; bh=Goz1koewlam7N4BCRizyAGWk3VNwtaFzB1YFRofHfgE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nMtBpbM4qxKvPtojR2iz3nz/PgmdWkLL0ab59T09GXFsZtKuTeZsgzVigxW2OFuvrnoNvz2tXipb1yTg8CIVUq/BfO96kPegOmh3fSg5Ux1GcChFyBqLDWWci3VFA9yE+97yZEyHyBXrxxoRkqHEvzMn4Muu6AuJez9bEPtVucE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nPYpoaUu; 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="nPYpoaUu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62655C4CEED; Thu, 8 May 2025 06:41:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746686464; bh=Goz1koewlam7N4BCRizyAGWk3VNwtaFzB1YFRofHfgE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nPYpoaUuzzX/h5Q0nB34Ial4zKyQHnvEei/7pBspxI575U1OTTZaJ1D/PvhY52DTU izjb58CVL4VZLoUYW+eNGatlPoyvFAplFaB1wV1o3rfilnzslhO/w0+gFp1wKgtXuX X+t9/6byfO09ZUVDj51B1Ow5uMEci+EHCnKBt2Ys= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37825: nvmet: fix out-of-bounds access in nvmet_enable_port Date: Thu, 8 May 2025 08:39:34 +0200 Message-ID: <2025050822-CVE-2025-37825-547b@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=2330; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nX+C63tnBf79BdYKwjMfctA/34KayMCdVsO8SbqggrA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkygbPk78vK/GI5LyQym99iCfsULyev7ddO15YunBz/Z 6r1X37xjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI2l8MC5qn8LDcdN2QHfDt xOaPs3oPbdKt/sUwz/pM3fzts35fupt40i+n7fkh63CTSwA= 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 out-of-bounds access in nvmet_enable_port When trying to enable a port that has no transport configured yet, nvmet_enable_port() uses NVMF_TRTYPE_MAX (255) to query the transports array, causing an out-of-bounds access: [ 106.058694] BUG: KASAN: global-out-of-bounds in nvmet_enable_port+0x42/0x1da [ 106.058719] Read of size 8 at addr ffffffff89dafa58 by task ln/632 [...] [ 106.076026] nvmet: transport type 255 not supported Since commit 200adac75888, NVMF_TRTYPE_MAX is the default state as configured by nvmet_ports_make(). Avoid this by checking for NVMF_TRTYPE_MAX before proceeding. The Linux kernel CVE team has assigned CVE-2025-37825 to this issue. Affected and fixed versions =========================== Issue introduced in 6.14 with commit 200adac75888182c09027e9b7852507dabd87034 and fixed in 6.14.5 with commit 83c00860a37b3fcba8026cb344101f1b8af547cf Issue introduced in 6.14 with commit 200adac75888182c09027e9b7852507dabd87034 and fixed in 6.15-rc4 with commit 3d7aa0c7b4e96cd460826d932e44710cdeb3378b 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-2025-37825 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/core.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/83c00860a37b3fcba8026cb344101f1b8af547cf https://git.kernel.org/stable/c/3d7aa0c7b4e96cd460826d932e44710cdeb3378b