Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 722A0388397 for ; Sat, 25 Jul 2026 08:55:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784969725; cv=none; b=p4s3Zbp8b1uRUqQ/uMaazunpZOUhtL/P1LQSIxVt2HlwmeRdzi3c3l/AFZ838D71Jb6JoXvGIXtmjqD7Enul/weFa00HKuBTbScXdyN22IbRv+TOs4v9UFHMoLsSgfend7jcdN1HLjQEL+d6ufGEK9YUrOEns70wduPmvJ/Wm7Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784969725; c=relaxed/simple; bh=+sajn+yjbbeP4oX+v+A1AL3k0cTpfa+4zSe2UP1PIkM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=S5GPoGBaT14pYdUb20Kt8D2ZTucGtQs/8An5gOfekdFpddx969BxtrJa2Du6sfTI/jRBcj31DTbv3IMcpVntANwpLURaMVIbVe3omGOXolpSd4v+BpIwfNatRT0po+7PLPV4Ar98+80e7aGb52tcWNS6a28SXBFtYSaKMwtsYCg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2gOuYLrw; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2gOuYLrw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9348C1F00A3D; Sat, 25 Jul 2026 08:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784969717; bh=aC1LgRXgQD4emOZBdoGH/2DD8E6D3REHvZhjIhkO4gU=; h=From:To:Cc:Subject:Date:Reply-To; b=2gOuYLrwa5Pg4TGXs7vYhCQS12jmXfP5zTBH3Z2veNCU2kQkg3eomT1wqVUMxkLOt O2LTxla1ErnC4IPeRSndDBSBZiPNCq9/COe45VFUHiIII+BQYrbGutlvzRIeJhIRzH 2gygw/r602j8nYAt+wSsZrsMxx/DhT3EMrHUT7VY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-64320: nvmet: fix pre-auth out-of-bounds heap read in Discovery Get Log Page Date: Sat, 25 Jul 2026 10:48:57 +0200 Message-ID: <2026072511-CVE-2026-64320-4b43@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4500; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fSejFe7m/w2g6NjC/uJzBVJSGTzOfcBjAhcG+eGkQPk=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkpFd7pEo/X97y8ZJytvz3gnKhvyIzYmOz0eO+0UpWW5 RP6GqQ7YlkYBJkYZMUUWb5s4zm6v+KQopeh7WmYOaxMIEMYuDgFYCJB2QwLpnaeO3/h/XEzRb8F wo95D/5edWjlIoYFXdKzCo4pPvGv23UmrkhuV3Du+QMnAQ== 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 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. The Linux kernel CVE team has assigned CVE-2026-64320 to this issue. Affected and fixed versions =========================== Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 6.12.96 with commit 33b974eb626154ae9348f2bac7de84cb2a3d9dd4 Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 6.18.39 with commit 56c021a0869260d04c4b65d1471936aaf9177114 Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 7.1.4 with commit a29b316b9bbfd269f323ab4ba9906a894025680f Issue introduced in 4.8 with commit a07b4970f464f13640e28e16dad6cfa33647cc99 and fixed in 7.2-rc1 with commit 53cd102a7a56079b11b897835bd9b94c14e6322c 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-2026-64320 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/discovery.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/33b974eb626154ae9348f2bac7de84cb2a3d9dd4 https://git.kernel.org/stable/c/56c021a0869260d04c4b65d1471936aaf9177114 https://git.kernel.org/stable/c/a29b316b9bbfd269f323ab4ba9906a894025680f https://git.kernel.org/stable/c/53cd102a7a56079b11b897835bd9b94c14e6322c