Skip to content
Heist/ feed
High

vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint

Type: advisorySource: Official CVE List1 source record

In the Linux kernel, the following vulnerability has been resolved: vhost-scsi: Fix handling of multiple calls to vhost_scsi_set_endpoint If vhost_scsi_set_endpoint is called multiple times without a vhost_scsi_clear_endpoint between them, we can hit multiple bugs found by Haoran Zhang: 1. Use-after-free when no tpgs are found: This fixes a use after free that occurs when vhost_scsi_set_endpoint is called more than once and calls after the first call do not find any tpgs to add to the vs_tpg. When vhost_scsi_set_endpoint first finds tpgs to add to the vs_tpg array match=true, so we will do: vhost_vq_set_backend(vq, vs_tpg); ... kfree(vs->vs_tpg); vs->vs_tpg = vs_tpg; If vhost_scsi_set_endpoint is called again and no tpgs are found match=false so we skip the vhost_vq_set_backend call leaving the pointer to the vs_tpg we then free via: kfree(vs->vs_tpg); vs->vs_tpg = vs_tpg; If a scsi request is then sent we do: vhost_scsi_handle_vq -> vhost_scsi_get_req -> vhost_vq_get_backend which sees the vs_tpg we just did a kfree on. 2. Tpg dir removal hang: This patch fixes an issue where we cannot remove a LIO/target layer tpg (and structs above it like the target) dir due to the refcount dropping to -1. The problem is that if vhost_scsi_set_endpoint detects a tpg is already in the vs->vs_tpg array or if the tpg has been removed so target_depend_item fails, the undepend goto handler will do target_undepend_item on all tpgs in the vs_tpg array dropping their refcount to 0. At this time v

Announced Group revision 1
Original source ↗

CVE-2025-22083

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2025-22083

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "4f7f46d32c9875004fae1d57ae3c02cc2e6cd6a3",
        "lessThan": "451c72f5e7cf5d339a6410a635cee0825687c3dc",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f7f46d32c9875004fae1d57ae3c02cc2e6cd6a3",
        "lessThan": "2b34bdc42df047794542f3e220fe989124e4499a",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f7f46d32c9875004fae1d57ae3c02cc2e6cd6a3",
        "lessThan": "3a19eb3d9818e28f14c818a18dc913344a52ca92",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f7f46d32c9875004fae1d57ae3c02cc2e6cd6a3",
        "lessThan": "3fd054baf382a426bbf5135ede0fc5673db74d3e",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f7f46d32c9875004fae1d57ae3c02cc2e6cd6a3",
        "lessThan": "63b449f73ab0dcc0ba11ceaa4c5c70bc86ccf03c",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "4f7f46d32c9875004fae1d57ae3c02cc2e6cd6a3",
        "lessThan": "5dd639a1646ef5fe8f4bf270fad47c5c3755b9b6",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "drivers/vhost/scsi.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "3.9"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "3.9",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.1.162",
        "versionType": "semver",
        "lessThanOrEqual": "6.1.*"
      },
      {
        "status": "unaffected",
        "version": "6.6.87",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.23",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.13.11",
        "versionType": "semver",
        "lessThanOrEqual": "6.13.*"
      },
      {
        "status": "unaffected",
        "version": "6.14.2",
        "versionType": "semver",
        "lessThanOrEqual": "6.14.*"
      },
      {
        "status": "unaffected",
        "version": "6.15",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "drivers/vhost/scsi.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2025-22083

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#26978 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement