In the Linux kernel, the following vulnerability has been resolved:
nvmet-rdma: handle inline data with a nonzero offset
nvmet_rdma_use_inline_sg() maps the host-controlled inline data offset
into the per-command inline scatterlist. The bounds check admits any
offset with off + len <= inline_data_size, but the mapping still assumes
the data begins in the first inline page:
<pre>
sg->offset = off;
sg->length = min_t(int, len, PAGE_SIZE - off);
</pre>
When a port is configured with inline_data_size > PAGE_SIZE (settable up
to max(SZ_16K, PAGE_SIZE)), an offset in (PAGE_SIZE, inline_data_size]
makes "PAGE_SIZE - off" underflow, so sg->length is set to ~4 GiB and
the block backend reads far past the first inline page. num_pages(len)
also ignores the offset, so an in-bounds offset whose [off, off+len)
span crosses a page boundary under-counts the scatterlist.
Map the offset properly: split it into a page index and an in-page
offset, start the scatterlist at that page, and size the page count from
page_off + len. Because the request scatterlist may now start at
inline_sg[page_idx] rather than inline_sg[0], generalize the inline-SGL
identity test in nvmet_rdma_release_rsp() to a range test; otherwise the
persistent inline scatterlist is mistaken for an allocated one and
nvmet_req_free_sgls() frees an inline page (and warns in
free_large_kmalloc()).
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - nvmet-rdma is an in-kernel NVMe-oF target that processes NVMe commands and inline data from remote initiators over RDMA (RoCE/IB) via RDMA RECV completions, placing it in the same network-reachable class as nvmet-tcp and other remote fabric targets.
AC:L - In deployments using inline_data_size above PAGE_SIZE (up to 16KB), a remote initiator fully controls the inline SGL offset and length in write commands and can deterministically trigger the integer underflow and multi-gigabyte scatterlist length without races or victim-specific timing.
PR:N - Exploitation requires only remote NVMe-oF RDMA connectivity to a configured target subsystem; no local UNIX privileges or Linux capabilities on the victim host are needed, and the vulnerable recv/command path is reachable before or without mandatory DH-HMAC-CHAP on I/O queues.
UI:N - Triggering the bug requires only sending crafted NVMe write commands with malicious inline SGL offsets over an established RDMA connection; no end-user actions such as mounting filesystems or opening files are required.
S:U - The vulnerability corrupts kernel heap memory and backing storage on the NVMe target host itself; it does not cross a VM, container, or IOMMU security boundary to impact a separate security authority.
C:H - The integer underflow sets scatterlist entries to ~4 GiB, causing the block backend to read far beyond the inline DMA buffer pages into adjacent kernel memory, and the erroneous sgl_free of inline pages creates use-after-free conditions enabling further information disclosure.
I:H - Out-of-bounds kernel memory is incorporated into block write bios corrupting exported backing storage, and the erroneous freeing of inline scatterlist pages enables heap corruption primitives that can be leveraged for arbitrary memory writes or control-flow hijacking.
A:H - Out-of-bounds access from multi-gigabyte scatterlist lengths, warnings from free_large_kmalloc() on freed inline pages, and nvmet fatal error handling can cause kernel oops, hung I/O, or panic on the storage target.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - nvmet-rdma is an in-kernel NVMe-oF target that processes NVMe commands and inline data from remote initiators over RDMA (RoCE/IB) via RDMA RECV completions, placing it in the same network-reachable class as nvmet-tcp and other remote fabric targets.
AC:L - In deployments using inline_data_size above PAGE_SIZE (up to 16KB), a remote initiator fully controls the inline SGL offset and length in write commands and can deterministically trigger the integer underflow and multi-gigabyte scatterlist length without races or victim-specific timing.
PR:N - Exploitation requires only remote NVMe-oF RDMA connectivity to a configured target subsystem; no local UNIX privileges or Linux capabilities on the victim host are needed, and the vulnerable recv/command path is reachable before or without mandatory DH-HMAC-CHAP on I/O queues.
UI:N - Triggering the bug requires only sending crafted NVMe write commands with malicious inline SGL offsets over an established RDMA connection; no end-user actions such as mounting filesystems or opening files are required.
S:U - The vulnerability corrupts kernel heap memory and backing storage on the NVMe target host itself; it does not cross a VM, container, or IOMMU security boundary to impact a separate security authority.
C:H - The integer underflow sets scatterlist entries to ~4 GiB, causing the block backend to read far beyond the inline DMA buffer pages into adjacent kernel memory, and the erroneous sgl_free of inline pages creates use-after-free conditions enabling further information disclosure.
I:H - Out-of-bounds kernel memory is incorporated into block write bios corrupting exported backing storage, and the erroneous freeing of inline scatterlist pages enables heap corruption primitives that can be leveraged for arbitrary memory writes or control-flow hijacking.
A:H - Out-of-bounds access from multi-gigabyte scatterlist lengths, warnings from free_large_kmalloc() on freed inline pages, and nvmet fatal error handling can cause kernel oops, hung I/O, or panic on the storage target.
CVSS 3.1