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 6DCA331A7E2 for ; Sun, 25 Jan 2026 14:37:33 +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=1769351853; cv=none; b=juO8tgLCwQPjeRYzzXvmZyaDYq8npDd9+87TD1C5XAUjNGuuf5J08MEcEKtsDj+KWjHZvVu5OJ1n5FL7u+EtgdJX3VetfweZLrBYnftLMQbCdd7/m8WPIk7RzNrLoECYLSpNcgLknuDXu/Bz6v1fqN2gAGtw77ve0V0fxpIKSV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769351853; c=relaxed/simple; bh=ewhTedqGWjDKbMTF9U6RgNAzhku60FuiLxIircf5jPg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=n61woKzkYITLfMKI9wKpp+3X+AyIb3krRYaQr1Eb5fT/VWg2uxAQ/H32UzuEXszDLGA43W30JOkamCU0BS9bwhgNU9BnFUQ9gYDlcFyihfpXr5BRPRm7retjswsx3eGads0JkrhNy33DT9kIVmTdcs+b5umqiIdQYGImRjSbqfE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=a37sjgZa; 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="a37sjgZa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7811C4CEF1; Sun, 25 Jan 2026 14:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769351853; bh=ewhTedqGWjDKbMTF9U6RgNAzhku60FuiLxIircf5jPg=; h=From:To:Cc:Subject:Date:Reply-To:From; b=a37sjgZaG1kG1d0XoCCes/Cw79T2vzCA9GZHbeNnMKNzgB+8dF9tSFeINjdI88qoi ha8gQTadnXxWDy4+tNklGs0poFSr4Q1fFdxh3PLeecUoMk8lY776MYT5ZVjKPi2tRz KaOUU9BvQM2xUImveXSL2XlaEsASD7Vnz4BZw5fs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-22998: nvme-tcp: fix NULL pointer dereferences in nvmet_tcp_build_pdu_iovec Date: Sun, 25 Jan 2026 15:36:34 +0100 Message-ID: <2026012533-CVE-2026-22998-8392@gregkh> X-Mailer: git-send-email 2.52.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=3609; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WtpyA41ZX1Yu1IKcFf+meUhUdvI/NvErooEvvLnAcuM=; b=owGbwMvMwCRo6H6F97bub03G02pJDJllWoX/L+18/o5b9lDCNZMiz4M5q0prmc1dfJYbWj4oP WGWUv23I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaSf4lhwSblEnNXftWJl2+d PXz99kmxeW5LdjPM03+7jeNVrKXYxnMszyMu33fY5XZjPQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: nvme-tcp: fix NULL pointer dereferences in nvmet_tcp_build_pdu_iovec Commit efa56305908b ("nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length") added ttag bounds checking and data_offset validation in nvmet_tcp_handle_h2c_data_pdu(), but it did not validate whether the command's data structures (cmd->req.sg and cmd->iov) have been properly initialized before processing H2C_DATA PDUs. The nvmet_tcp_build_pdu_iovec() function dereferences these pointers without NULL checks. This can be triggered by sending H2C_DATA PDU immediately after the ICREQ/ICRESP handshake, before sending a CONNECT command or NVMe write command. Attack vectors that trigger NULL pointer dereferences: 1. H2C_DATA PDU sent before CONNECT → both pointers NULL 2. H2C_DATA PDU for READ command → cmd->req.sg allocated, cmd->iov NULL 3. H2C_DATA PDU for uninitialized command slot → both pointers NULL The fix validates both cmd->req.sg and cmd->iov before calling nvmet_tcp_build_pdu_iovec(). Both checks are required because: - Uninitialized commands: both NULL - READ commands: cmd->req.sg allocated, cmd->iov NULL - WRITE commands: both allocated The Linux kernel CVE team has assigned CVE-2026-22998 to this issue. Affected and fixed versions =========================== Issue introduced in 6.8 with commit efa56305908ba20de2104f1b8508c6a7401833be and fixed in 6.12.67 with commit 3def5243150716be86599c2a1767c29c68838b6d Issue introduced in 6.8 with commit efa56305908ba20de2104f1b8508c6a7401833be and fixed in 6.18.7 with commit 374b095e265fa27465f34780e0eb162ff1bef913 Issue introduced in 6.8 with commit efa56305908ba20de2104f1b8508c6a7401833be and fixed in 6.19-rc6 with commit 32b63acd78f577b332d976aa06b56e70d054cbba Issue introduced in 5.4.268 with commit ee5e7632e981673f42a50ade25e71e612e543d9d Issue introduced in 5.10.209 with commit f775f2621c2ac5cc3a0b3a64665dad4fb146e510 Issue introduced in 5.15.148 with commit 4cb3cf7177ae3666be7fb27d4ad4d72a295fb02d Issue introduced in 6.1.75 with commit 2871aa407007f6f531fae181ad252486e022df42 Issue introduced in 6.6.14 with commit 24e05760186dc070d3db190ca61efdbce23afc88 Issue introduced in 6.7.2 with commit 70154e8d015c9b4fb56c1a2ef1fc8b83d45c7f68 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-22998 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/tcp.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/3def5243150716be86599c2a1767c29c68838b6d https://git.kernel.org/stable/c/374b095e265fa27465f34780e0eb162ff1bef913 https://git.kernel.org/stable/c/32b63acd78f577b332d976aa06b56e70d054cbba