{"id":"CVE-2026-22998","summary":"nvme-tcp: fix NULL pointer dereferences in nvmet_tcp_build_pdu_iovec","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nnvme-tcp: fix NULL pointer dereferences in nvmet_tcp_build_pdu_iovec\n\nCommit efa56305908b (\"nvmet-tcp: Fix a kernel panic when host sends an invalid H2C PDU length\")\nadded ttag bounds checking and data_offset\nvalidation in nvmet_tcp_handle_h2c_data_pdu(), but it did not validate\nwhether the command's data structures (cmd-\u003ereq.sg and cmd-\u003eiov) have\nbeen properly initialized before processing H2C_DATA PDUs.\n\nThe nvmet_tcp_build_pdu_iovec() function dereferences these pointers\nwithout NULL checks. This can be triggered by sending H2C_DATA PDU\nimmediately after the ICREQ/ICRESP handshake, before\nsending a CONNECT command or NVMe write command.\n\nAttack vectors that trigger NULL pointer dereferences:\n1. H2C_DATA PDU sent before CONNECT → both pointers NULL\n2. H2C_DATA PDU for READ command → cmd-\u003ereq.sg allocated, cmd-\u003eiov NULL\n3. H2C_DATA PDU for uninitialized command slot → both pointers NULL\n\nThe fix validates both cmd-\u003ereq.sg and cmd-\u003eiov before calling\nnvmet_tcp_build_pdu_iovec(). Both checks are required because:\n- Uninitialized commands: both NULL\n- READ commands: cmd-\u003ereq.sg allocated, cmd-\u003eiov NULL\n- WRITE commands: both allocated","modified":"2026-04-02T17:30:00.843646Z","published":"2026-01-25T14:36:12.935Z","related":["ALSA-2026:2264","ALSA-2026:2378","ALSA-2026:2721","ALSA-2026:2722","SUSE-SU-2026:0962-1","SUSE-SU-2026:1078-1","SUSE-SU-2026:1081-1","SUSE-SU-2026:20667-1","SUSE-SU-2026:20720-1","SUSE-SU-2026:20838-1","SUSE-SU-2026:20845-1","SUSE-SU-2026:20876-1","SUSE-SU-2026:20931-1","openSUSE-SU-2026:20416-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22998.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/32b63acd78f577b332d976aa06b56e70d054cbba"},{"type":"WEB","url":"https://git.kernel.org/stable/c/374b095e265fa27465f34780e0eb162ff1bef913"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3def5243150716be86599c2a1767c29c68838b6d"},{"type":"WEB","url":"https://git.kernel.org/stable/c/76abc83a9d25593c2b7613c549413079c14a4686"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7d75570002929d20e40110d6b03e46202c9d1bc7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/baabe43a0edefac8cd7b981ff87f967f6034dafe"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fdecd3b6aac10d5a18d0dc500fe57f8648b66cd4"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/22xxx/CVE-2026-22998.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-22998"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"f775f2621c2ac5cc3a0b3a64665dad4fb146e510"},{"fixed":"baabe43a0edefac8cd7b981ff87f967f6034dafe"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"4cb3cf7177ae3666be7fb27d4ad4d72a295fb02d"},{"fixed":"76abc83a9d25593c2b7613c549413079c14a4686"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"2871aa407007f6f531fae181ad252486e022df42"},{"fixed":"7d75570002929d20e40110d6b03e46202c9d1bc7"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"24e05760186dc070d3db190ca61efdbce23afc88"},{"fixed":"fdecd3b6aac10d5a18d0dc500fe57f8648b66cd4"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"efa56305908ba20de2104f1b8508c6a7401833be"},{"fixed":"3def5243150716be86599c2a1767c29c68838b6d"},{"fixed":"374b095e265fa27465f34780e0eb162ff1bef913"},{"fixed":"32b63acd78f577b332d976aa06b56e70d054cbba"}]},{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"0"},{"last_affected":"ee5e7632e981673f42a50ade25e71e612e543d9d"},{"last_affected":"70154e8d015c9b4fb56c1a2ef1fc8b83d45c7f68"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-22998.json"}}],"schema_version":"1.7.5"}