CVE-2025-38209 (GCVE-0-2025-38209)
Vulnerability from cvelistv5
Published
2025-07-04 13:37
Modified
2026-10-15 21:52
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: nvme-tcp: remove tag set when second admin queue config fails Commit 104d0e2f6222 ("nvme-fabrics: reset admin connection for secure concatenation") modified nvme_tcp_setup_ctrl() to call nvme_tcp_configure_admin_queue() twice. The first call prepares for DH-CHAP negotitation, and the second call is required for secure concatenation. However, this change triggered BUG KASAN slab-use-after- free in blk_mq_queue_tag_busy_iter(). This BUG can be recreated by repeating the blktests test case nvme/063 a few times [1]. When the BUG happens, nvme_tcp_create_ctrl() fails in the call chain below: nvme_tcp_create_ctrl() nvme_tcp_alloc_ctrl() new=true ... Alloc nvme_tcp_ctrl and admin_tag_set nvme_tcp_setup_ctrl() new=true nvme_tcp_configure_admin_queue() new=true ... Succeed nvme_alloc_admin_tag_set() ... Alloc the tag set for admin_tag_set nvme_stop_keep_alive() nvme_tcp_teardown_admin_queue() remove=false nvme_tcp_configure_admin_queue() new=false nvme_tcp_alloc_admin_queue() ... Fail, but do not call nvme_remove_admin_tag_set() nvme_uninit_ctrl() nvme_put_ctrl() ... Free up the nvme_tcp_ctrl and admin_tag_set The first call of nvme_tcp_configure_admin_queue() succeeds with new=true argument. The second call fails with new=false argument. This second call does not call nvme_remove_admin_tag_set() on failure, due to the new=false argument. Then the admin tag set is not removed. However, nvme_tcp_create_ctrl() assumes that nvme_tcp_setup_ctrl() would call nvme_remove_admin_tag_set(). Then it frees up struct nvme_tcp_ctrl which has admin_tag_set field. Later on, the timeout handler accesses the admin_tag_set field and causes the BUG KASAN slab-use-after-free. To not leave the admin tag set, call nvme_remove_admin_tag_set() when the second nvme_tcp_configure_admin_queue() call fails. Do not return from nvme_tcp_setup_ctrl() on failure. Instead, jump to "destroy_admin" go-to label to call nvme_tcp_teardown_admin_queue() which calls nvme_remove_admin_tag_set().
Impacted products
Vendor Product Version
Linux Linux Version: 104d0e2f622233477ef7e57e59e8a4c3bb062c82
Version: 104d0e2f622233477ef7e57e59e8a4c3bb062c82
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2025-38209",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "total"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2026-10-15T21:48:31.130301Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2026-10-15T21:52:11.489Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/nvme/host/tcp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "db1da838b6012e4570c6f81e28ffe1d0ff595948",
              "status": "affected",
              "version": "104d0e2f622233477ef7e57e59e8a4c3bb062c82",
              "versionType": "git"
            },
            {
              "lessThan": "e7143706702a209c814ed2c3fc6486c2a7decf6c",
              "status": "affected",
              "version": "104d0e2f622233477ef7e57e59e8a4c3bb062c82",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/nvme/host/tcp.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.15"
            },
            {
              "lessThan": "6.15",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.15.*",
              "status": "unaffected",
              "version": "6.15.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.16",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.15.4",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.16",
                  "versionStartIncluding": "6.15",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nnvme-tcp: remove tag set when second admin queue config fails\n\nCommit 104d0e2f6222 (\"nvme-fabrics: reset admin connection for secure\nconcatenation\") modified nvme_tcp_setup_ctrl() to call\nnvme_tcp_configure_admin_queue() twice. The first call prepares for\nDH-CHAP negotitation, and the second call is required for secure\nconcatenation. However, this change triggered BUG KASAN slab-use-after-\nfree in blk_mq_queue_tag_busy_iter(). This BUG can be recreated by\nrepeating the blktests test case nvme/063 a few times [1].\n\nWhen the BUG happens, nvme_tcp_create_ctrl() fails in the call chain\nbelow:\n\nnvme_tcp_create_ctrl()\n nvme_tcp_alloc_ctrl() new=true             ... Alloc nvme_tcp_ctrl and admin_tag_set\n nvme_tcp_setup_ctrl() new=true\n  nvme_tcp_configure_admin_queue() new=true ... Succeed\n   nvme_alloc_admin_tag_set()               ... Alloc the tag set for admin_tag_set\n  nvme_stop_keep_alive()\n  nvme_tcp_teardown_admin_queue() remove=false\n  nvme_tcp_configure_admin_queue() new=false\n   nvme_tcp_alloc_admin_queue()             ... Fail, but do not call nvme_remove_admin_tag_set()\n nvme_uninit_ctrl()\n nvme_put_ctrl()                            ... Free up the nvme_tcp_ctrl and admin_tag_set\n\nThe first call of nvme_tcp_configure_admin_queue() succeeds with\nnew=true argument. The second call fails with new=false argument. This\nsecond call does not call nvme_remove_admin_tag_set() on failure, due to\nthe new=false argument. Then the admin tag set is not removed. However,\nnvme_tcp_create_ctrl() assumes that nvme_tcp_setup_ctrl() would call\nnvme_remove_admin_tag_set(). Then it frees up struct nvme_tcp_ctrl which\nhas admin_tag_set field. Later on, the timeout handler accesses the\nadmin_tag_set field and causes the BUG KASAN slab-use-after-free.\n\nTo not leave the admin tag set, call nvme_remove_admin_tag_set() when\nthe second nvme_tcp_configure_admin_queue() call fails. Do not return\nfrom nvme_tcp_setup_ctrl() on failure. Instead, jump to \"destroy_admin\"\ngo-to label to call nvme_tcp_teardown_admin_queue() which calls\nnvme_remove_admin_tag_set()."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 9.8,
            "baseSeverity": "CRITICAL",
            "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:N - The trigger \u2014 failure of the second admin-queue configuration \u2014 is entirely controlled by the remote NVMe-over-TCP target across the network (TCP reset, failed TLS-PSK handshake, or an error status to Connect/Enable/Identify). A malicious, compromised, or impersonated storage target attacks the initiator host\u0027s kernel purely over TCP.\nAC:L - A rogue target reproduces the condition on demand and 100% reliably by simply refusing or aborting the second connection; nothing depends on timing, memory layout, or state outside the attacker\u0027s control, and the bug reproduces after a few blktests nvme/063 iterations. The required kernel options (CONFIG_NVME_TCP_TLS, CONFIG_NVME_HOST_AUTH) are enabled in mainstream distribution kernels.\nPR:N - The attacker needs no privileges or credentials on the victim host, and the failing second connection happens before any successful mutual authentication. Because DH-CHAP is unidirectional by default (host authenticates to controller), an impersonating target can pass the first handshake without knowing the secret and then simply fail the TLS reconnect.\nUI:N - NVMe-oF controllers are created automatically by nvmf-autoconnect systemd/udev tooling at boot and after controller-loss timeouts, so no human action is required at exploitation time. The attacker only has to be the endpoint the host is already configured to connect to.\nS:U - The use-after-free is on a kernel slab object and its consequences stay entirely within the kernel\u0027s own security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed nvme_tcp_ctrl containing the live blk_mq_tag_set is subsequently dereferenced by blk_mq_queue_tag_busy_iter(), which follows set-\u003etags[] pointers out of reclaimed heap memory. Reoccupying the slab yields an arbitrary kernel read primitive and leaks kernel pointers.\nI:H - The dangling tag set is used to call set-\u003eops-\u003etimeout(), an indirect call through a function-pointer table read from freed, sprayable heap memory, giving control-flow hijack and arbitrary write potential. Each failed connect attempt leaks another dangling object, allowing repeated heap grooming.\nA:H - The reported failure mode is a KASAN slab-use-after-free in blk_mq_queue_tag_busy_iter() leading to kernel oops/panic, and the corrupted structure is walked by the block-layer timeout worker. A remote attacker can induce it repeatedly on every connection attempt."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T12:00:22.452Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/db1da838b6012e4570c6f81e28ffe1d0ff595948"
        },
        {
          "url": "https://git.kernel.org/stable/c/e7143706702a209c814ed2c3fc6486c2a7decf6c"
        }
      ],
      "title": "nvme-tcp: remove tag set when second admin queue config fails",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2025-38209",
    "datePublished": "2025-07-04T13:37:28.853Z",
    "dateReserved": "2025-04-16T04:51:23.994Z",
    "dateUpdated": "2026-10-15T21:52:11.489Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2025-38209\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"yes\"}, {\"Technical Impact\": \"total\"}], \"version\": \"2.0.3\", \"timestamp\": \"2026-10-15T21:48:31.130301Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2026-10-15T21:48:32.051Z\"}}], \"cna\": {\"title\": \"nvme-tcp: remove tag set when second admin queue config fails\", \"metrics\": [{\"cvssV3_1\": {\"version\": \"3.1\", \"baseScore\": 9.8, \"baseSeverity\": \"CRITICAL\", \"vectorString\": \"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\"}, \"scenarios\": [{\"lang\": \"en\", \"value\": \"AV:N - The trigger \\u2014 failure of the second admin-queue configuration \\u2014 is entirely controlled by the remote NVMe-over-TCP target across the network (TCP reset, failed TLS-PSK handshake, or an error status to Connect/Enable/Identify). A malicious, compromised, or impersonated storage target attacks the initiator host\u0027s kernel purely over TCP.\\nAC:L - A rogue target reproduces the condition on demand and 100% reliably by simply refusing or aborting the second connection; nothing depends on timing, memory layout, or state outside the attacker\u0027s control, and the bug reproduces after a few blktests nvme/063 iterations. The required kernel options (CONFIG_NVME_TCP_TLS, CONFIG_NVME_HOST_AUTH) are enabled in mainstream distribution kernels.\\nPR:N - The attacker needs no privileges or credentials on the victim host, and the failing second connection happens before any successful mutual authentication. Because DH-CHAP is unidirectional by default (host authenticates to controller), an impersonating target can pass the first handshake without knowing the secret and then simply fail the TLS reconnect.\\nUI:N - NVMe-oF controllers are created automatically by nvmf-autoconnect systemd/udev tooling at boot and after controller-loss timeouts, so no human action is required at exploitation time. The attacker only has to be the endpoint the host is already configured to connect to.\\nS:U - The use-after-free is on a kernel slab object and its consequences stay entirely within the kernel\u0027s own security authority. No VM, IOMMU, or sandbox boundary is crossed.\\nC:H - The freed nvme_tcp_ctrl containing the live blk_mq_tag_set is subsequently dereferenced by blk_mq_queue_tag_busy_iter(), which follows set-\u003etags[] pointers out of reclaimed heap memory. Reoccupying the slab yields an arbitrary kernel read primitive and leaks kernel pointers.\\nI:H - The dangling tag set is used to call set-\u003eops-\u003etimeout(), an indirect call through a function-pointer table read from freed, sprayable heap memory, giving control-flow hijack and arbitrary write potential. Each failed connect attempt leaks another dangling object, allowing repeated heap grooming.\\nA:H - The reported failure mode is a KASAN slab-use-after-free in blk_mq_queue_tag_busy_iter() leading to kernel oops/panic, and the corrupted structure is walked by the block-layer timeout worker. A remote attacker can induce it repeatedly on every connection attempt.\"}]}], \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"104d0e2f622233477ef7e57e59e8a4c3bb062c82\", \"lessThan\": \"db1da838b6012e4570c6f81e28ffe1d0ff595948\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"104d0e2f622233477ef7e57e59e8a4c3bb062c82\", \"lessThan\": \"e7143706702a209c814ed2c3fc6486c2a7decf6c\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/nvme/host/tcp.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.15\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.15\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.15.4\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.15.*\"}, {\"status\": \"unaffected\", \"version\": \"6.16\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/nvme/host/tcp.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/db1da838b6012e4570c6f81e28ffe1d0ff595948\"}, {\"url\": \"https://git.kernel.org/stable/c/e7143706702a209c814ed2c3fc6486c2a7decf6c\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nnvme-tcp: remove tag set when second admin queue config fails\\n\\nCommit 104d0e2f6222 (\\\"nvme-fabrics: reset admin connection for secure\\nconcatenation\\\") modified nvme_tcp_setup_ctrl() to call\\nnvme_tcp_configure_admin_queue() twice. The first call prepares for\\nDH-CHAP negotitation, and the second call is required for secure\\nconcatenation. However, this change triggered BUG KASAN slab-use-after-\\nfree in blk_mq_queue_tag_busy_iter(). This BUG can be recreated by\\nrepeating the blktests test case nvme/063 a few times [1].\\n\\nWhen the BUG happens, nvme_tcp_create_ctrl() fails in the call chain\\nbelow:\\n\\nnvme_tcp_create_ctrl()\\n nvme_tcp_alloc_ctrl() new=true             ... Alloc nvme_tcp_ctrl and admin_tag_set\\n nvme_tcp_setup_ctrl() new=true\\n  nvme_tcp_configure_admin_queue() new=true ... Succeed\\n   nvme_alloc_admin_tag_set()               ... Alloc the tag set for admin_tag_set\\n  nvme_stop_keep_alive()\\n  nvme_tcp_teardown_admin_queue() remove=false\\n  nvme_tcp_configure_admin_queue() new=false\\n   nvme_tcp_alloc_admin_queue()             ... Fail, but do not call nvme_remove_admin_tag_set()\\n nvme_uninit_ctrl()\\n nvme_put_ctrl()                            ... Free up the nvme_tcp_ctrl and admin_tag_set\\n\\nThe first call of nvme_tcp_configure_admin_queue() succeeds with\\nnew=true argument. The second call fails with new=false argument. This\\nsecond call does not call nvme_remove_admin_tag_set() on failure, due to\\nthe new=false argument. Then the admin tag set is not removed. However,\\nnvme_tcp_create_ctrl() assumes that nvme_tcp_setup_ctrl() would call\\nnvme_remove_admin_tag_set(). Then it frees up struct nvme_tcp_ctrl which\\nhas admin_tag_set field. Later on, the timeout handler accesses the\\nadmin_tag_set field and causes the BUG KASAN slab-use-after-free.\\n\\nTo not leave the admin tag set, call nvme_remove_admin_tag_set() when\\nthe second nvme_tcp_configure_admin_queue() call fails. Do not return\\nfrom nvme_tcp_setup_ctrl() on failure. Instead, jump to \\\"destroy_admin\\\"\\ngo-to label to call nvme_tcp_teardown_admin_queue() which calls\\nnvme_remove_admin_tag_set().\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.15.4\", \"versionStartIncluding\": \"6.15\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.16\", \"versionStartIncluding\": \"6.15\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-08-05T12:00:22.452Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2025-38209\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-10-15T21:52:11.489Z\", \"dateReserved\": \"2025-04-16T04:51:23.994Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2025-07-04T13:37:28.853Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…