{
  "schema_version": "1.6.1",
  "id": "RPI-CVE-2026-97536",
  "modified": "2026-10-09T11:39:44Z",
  "upstream": [
    "CVE-2026-97536"
  ],
  "published": "2026-09-25T10:24:31Z",
  "summary": "scsi: qla2xxx: Fix use-after-free of qpair work on queue teardown",
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: qla2xxx: Fix use-after-free of qpair work on queue teardown\n\nThe response queue MSI-X handler qla2xxx_msix_rsp_q() schedules\nqla_do_work() via queue_work(ha->wq, &qpair->q_work). qla_do_work()\ndereferences the qpair (vha, rsp) and takes qpair->qp_lock.\n\nDuring teardown, qla2xxx_delete_qpair() deletes the response queue, which\ncalls free_irq() in qla25xx_free_rsp_que(), and then frees the queue and\nthe qpair. free_irq() waits for running hardirq handlers but does not\ncancel work already placed on ha->wq. A still-pending q_work then runs\nqla_do_work() against the freed qpair and response queue, causing a\nuse-after-free. This is especially likely during full adapter teardown,\nwhere destroy_workqueue(ha->wq) forces pending work to run after the queue\npairs have been freed.\n\nFlush the work item with cancel_work_sync() in qla25xx_free_rsp_que()\nafter free_irq() has released the interrupt (so no new work can be\nqueued) and before the response queue and qpair memory are freed (so the\nflushed handler still sees valid memory). Guard on rsp->qpair and ha->wq\nto match the INIT_WORK() condition and avoid operating on an\nuninitialized work_struct.",
  "severity": [
    {
      "type": "CVSS_V3",
      "score": "CVSS:3.1/AV:A/AC:H/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": null,
            "compiled_filter": false
          }
        }
      }
    }
  ],
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://www.cve.org/CVERecord?id=CVE-2026-97536"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/dd6c14db0dbb7774278e62c8114902f953540932"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/1710a69fd74d0b4bdfcc57c3309b1c4057f70d85"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/f1f4d1cb93eeeb250eac9405121933e268eefbd3"
    },
    {
      "type": "FIX",
      "url": "https://git.kernel.org/stable/c/19788a55cab61d78e33e0914a5a31d27843e8a4a"
    }
  ],
  "database_specific": {
    "source": "https://git.kernel.org/pub/scm/linux/security/vulns.git",
    "upstream_modified": "2026-10-03T11:04:09Z",
    "severity": {
      "source": "kernel CNA",
      "cvss_v3_score": 7.5,
      "cvss_v3_severity": "High",
      "scenario": "AV:A - qla2xxx_msix_rsp_q() queue_work()s &qpair->q_work when firmware posts FC/FCoE response-queue IOCBs (STATUS_TYPE/FCP_RSP, LOGINOUT, CT/ELS); qla25xx_free_rsp_que() is reached from qla2xxx_delete_qpair() via qla25xx_delete_rsp_que(). IS_CNA_CAPABLE QLogic CNAs speak FCoE on the SAN fabric, an L2/adjacent transport not a routable IP service.\nAC:H - The UAF fires only when qla25xx_free_rsp_que() free_irq()s then kfree()s rsp and qla2xxx_delete_qpair() kfree()s the qpair while q_work is still queued. Those run from qla24xx_vport_delete() (fc_vport sysfs S_IWUSR) or qla2x00_free_device() after scsi_remove_host, a victim qpair/adapter teardown a fabric peer cannot initiate.\nPR:N - qla2xxx_msix_rsp_q() handles unauthenticated Fibre Channel/FCoE firmware completions in IRQ context with no capable() or Linux credential check, so a SAN N_Port needs no account on the victim. The teardown path is victim-side and does not grant the fabric attacker host privileges.\nUI:N - qla2xxx_msix_rsp_q() schedules q_work automatically on response-queue interrupts. Concurrent qpair teardown in qla24xx_vport_delete() or qla2x00_remove_one()->qla2x00_free_device() is driver/NPIV/PCI lifecycle, not a victim mount or open of attacker-supplied media.\nS:U - kfree of struct qla_qpair and struct rsp_que and the later qla_do_work() use-after-free stay inside the host kernel qla2xxx driver and do not cross a VM, IOMMU, or other separate security-authority boundary.\nC:H - After kfree(qpair) and kfree(rsp), qla_do_work() container_of()s the freed qpair, loads qpair->vha and qpair->rsp, then qla24xx_process_response_queue() reads the dangling rsp ring/IOCBs. That kernel heap use-after-free enables disclosure of reused object contents.\nI:H - qla_do_work() takes spin_lock_irqsave(&qpair->qp_lock) on the freed qpair and qla24xx_process_response_queue() writes rsp->ring_index and completion state through dangling rsp/req pointers, yielding a kernel write and control-flow hijack primitive.\nA:H - Use-after-free of qpair from qla_do_work() produces a kernel oops or panic even when not fully exploited. qla2x00_free_device() calls destroy_workqueue(ha->wq) after qla25xx_delete_queues() has already kfree'd the qpairs, forcing pending q_work to run against freed memory."
    }
  }
}
