{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2024-26760",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2024-26760"
  ],
  "published": "2024-04-03T17:31:22Z",
  "summary": "scsi: target: pscsi: Fix bio_put() for error case",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: target: pscsi: Fix bio_put() for error case\n\nAs of commit 066ff571011d (\"block: turn bio_kmalloc into a simple kmalloc\nwrapper\"), a bio allocated by bio_kmalloc() must be freed by bio_uninit()\nand kfree(). That is not done properly for the error case, hitting WARN and\nNULL pointer dereference in bio_free().",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
    }
  ],
  "affected": [
    {
      "package": {
        "ecosystem": "Raspberry Pi OS:12",
        "name": "linux"
      },
      "versions": [
        "1:6.1.47-1+rpt4"
      ],
      "ecosystem_specific": {
        "binaries": [
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-2712",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v6",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v7l",
            "binary_version": "1:6.1.47-1+rpt4"
          },
          {
            "binary_name": "linux-image-6.1.0-rpi3-rpi-v8",
            "binary_version": "1:6.1.47-1+rpt4"
          }
        ]
      },
      "database_specific": {
        "per_version": {
          "1:6.1.47-1+rpt4": {
            "linux_commit": "655fc658a15ae7a6f37103754adb39ba52a9a14e",
            "upstream_version": "6.1.47",
            "assessment": "commit ancestry (strak rule)",
            "upstream_fixed": "6.1.80",
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2024-26760"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f49b20fd0134da84a6bd8108f9e73c077b7d6231"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/4ebc079f0c7dcda1270843ab0f38ab4edb8f7921"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1cfe9489fb563e9a0c9cdc5ca68257a44428c2ec"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/de959094eb2197636f7c803af0943cb9d3b35804"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-08-05T11:52:36Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 9.8,
      "cvss_v3_severity": "Critical",
      "scenario": "AV:N - The pscsi backstore is driven by SCSI CDBs arriving over a LIO fabric, primarily iscsi_target on TCP/3260, where the attacker-controlled Expected Data Transfer Length in a single remote SCSI Command PDU reaches pscsi_map_sg(). No local access is needed.\nAC:L - The failure path is entered deterministically by choosing a transfer length that exceeds the backing device's max_hw_sectors/max_segments, making the second blk_rq_append_bio() fail; the attacker fully controls this value and can also tune it so bi_max_vecs lands in the range that triggers the invalid kmem_cache_free.\nPR:N - passthrough_parse_cdb() applies no length validation, and an iSCSI initiator needs no secret \u2014 LIO demo mode (generate_node_acls/authentication=0) admits any initiator, and even with ACLs the initiator IQN is a self-declared string, not a credential.\nUI:N - The bug is triggered entirely by an attacker-sent SCSI command processed in the target's command path; no action by any local user or administrator is required.\nS:U - The invalid free and the resulting corruption/oops are confined to the host kernel, which is both the vulnerable and the impacted component; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - bvec_free() frees an interior pointer of the kmalloc'd bio into an unrelated biovec kmem_cache, splicing a kmalloc slab onto that cache's freelist and producing cross-cache overlapping allocations that can be groomed into an arbitrary kernel-memory read.\nI:H - The same invalid free is a slab-corruption primitive \u2014 biovec objects handed out over live kmalloc memory give type confusion and a write primitive over adjacent kernel objects, exploitable for control-flow hijack.\nA:H - bio_free() unconditionally dereferences the NULL bio_set via bs->front_pad, producing a WARN plus a guaranteed NULL pointer dereference oops in the target command path on every trigger, repeatable by the remote attacker (immediate panic with panic_on_oops/panic_on_warn)."
    }
  }
}
