| From bippy-1.2.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-37825: nvmet: fix out-of-bounds access in nvmet_enable_port |
| |
| 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 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 |