CVE-2026-64320 in Linuxinfo

Summary

by MITRE • 07/25/2026

In the Linux kernel, the following vulnerability has been resolved:

nvmet: fix pre-auth out-of-bounds heap read in Discovery Get Log Page

nvmet_execute_disc_get_log_page() validates only the dword alignment of the host-supplied Log Page Offset (lpo). The 64-bit offset is then added to a small kzalloc'd buffer that holds the discovery log page and the result is passed straight to nvmet_copy_to_sgl(), which memcpy()s data_len bytes out to the host with no source-side bound check:

u64 offset = nvmet_get_log_page_offset(req->cmd); /* 64-bit host */ size_t data_len = nvmet_get_log_page_len(req->cmd); /* 32-bit host */ ... if (offset & 0x3) { ... } /* only check */
... alloc_len = sizeof(*hdr) + entry_size * discovery_log_entries(req); buffer = kzalloc(alloc_len, GFP_KERNEL); ... status = nvmet_copy_to_sgl(req, 0, buffer + offset, data_len);

The Discovery controller is unauthenticated -- nvmet_host_allowed() returns true unconditionally for the discovery subsystem -- so the call is reachable pre-authentication by any TCP/RDMA/FC peer that can reach the nvmet target. With a discovery log page of ~1 KiB, an attacker requesting up to 4 KiB starting at offset == alloc_len reads the next slab page out and gets its content returned over the fabric (an empirical run on a default nvmet-tcp loopback target leaked 81 canonical kernel pointers in one Get Log Page response). Pointing the offset at unmapped kernel memory faults the in-kernel memcpy and crashes (or panics, on panic_on_oops=1) the target host instead.

The attacker-controlled source-side offset pattern "nvmet_copy_to_sgl(req, 0, buffer + ATTACKER_OFFSET, ...)" is unique to nvmet_execute_disc_get_log_page in the entire nvmet codebase: every other Get Log Page handler in admin-cmd.c either ignores lpo (and silently starts every response at offset 0) or tracks a local destination offset with a fixed source pointer.

Validate the host-supplied offset against the log page size, cap the copy length to what is actually available, and zero-fill any remainder of the host transfer buffer. The zero-fill matches the existing short-response pattern in nvmet_execute_get_log_changed_ns() (admin-cmd.c) and prevents leaking transport SGL contents when the host asks for more bytes than the log page contains.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 07/25/2026

The vulnerability resides within the Linux kernel's nvme target implementation where a pre-authentication heap out-of-bounds read occurs during discovery log page retrieval. This flaw affects the nvmet subsystem which handles NVMe over Fabrics targets and specifically impacts the Discovery controller functionality that operates without authentication requirements. The issue stems from insufficient validation of the host-supplied Log Page Offset parameter, which is a 64-bit value that should be rigorously checked against the actual buffer boundaries before any memory operations occur.

The technical implementation flaw manifests in the nvmet_execute_disc_get_log_page function where only dword alignment is validated for the offset field while failing to check whether the offset falls within the allocated buffer limits. The system allocates a relatively small kernel heap buffer using kzalloc with a size determined by the discovery log page header and entry count, yet proceeds to perform a memory copy operation without proper bounds checking. This allows an attacker to specify an offset that extends beyond the allocated buffer boundaries, potentially reading adjacent memory regions including kernel stack data or other heap allocations.

The operational impact is significant as this vulnerability can be exploited by any remote peer that can establish communication with the nvmet target through TCP, RDMA, or FC protocols without requiring authentication. The discovery log page itself is approximately 1 kilobyte in size, but attackers can request up to 4 kilobytes of data starting from an offset equal to the allocation length, thereby reading content from the next memory slab page. This exploitation pattern has demonstrated the ability to leak canonical kernel pointers, which represents a critical information disclosure vulnerability that could aid in further exploitation attempts.

The vulnerability aligns with CWE-129 Input Validation and CWE-787 Out-of-bounds Write patterns, representing both improper input validation and out-of-bounds memory access issues. From an ATT&CK framework perspective, this maps to T1059 Command and Scripting Interpreter and T1566 Phishing, as it enables attackers to gain system information that could be used in subsequent attacks or to establish persistence through privilege escalation vectors. The exploitation directly targets the kernel's memory management subsystem, specifically the slab allocator behavior where adjacent memory pages are accessible due to insufficient boundary checking.

The exploitation pattern results in either a controlled heap read operation that leaks sensitive kernel memory contents or an uncontrolled fault when the attacker points the offset toward unmapped kernel memory, causing system crashes or panics. The vulnerability is unique within the nvmet codebase because this specific function uses a host-controlled source pointer with no local offset tracking mechanism unlike other Get Log Page handlers in admin-cmd.c that either ignore the offset entirely or maintain proper local state management. The fix requires validating the host-supplied offset against the actual log page size, properly capping the copy length to available data, and implementing zero-filling for any remainder of the host transfer buffer to prevent information leakage.

The recommended mitigation approach involves implementing proper bounds checking that validates the 64-bit offset parameter against the allocated buffer size before any memory operations occur. The solution should cap the data copy length to prevent exceeding the actual log page content boundaries while maintaining consistency with existing kernel patterns such as those seen in nvmet_execute_get_log_changed_ns() which already implements zero-filling for short responses. This approach ensures that even if an attacker supplies malicious offset values, the system will not leak kernel memory contents or cause unintended crashes, thereby maintaining both system stability and information confidentiality. The fix should be applied to all NVMe over Fabrics implementations within the kernel to prevent similar issues in related subsystems that may share similar architectural patterns.

Responsible

Linux

Reservation

07/19/2026

Disclosure

07/25/2026

Moderation

accepted

CPE

ready

EPSS

0.00250

KEV

no

Activities

low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!