{
  "id": "CVE-2025-39841",
  "url": "https://poc.griffinguard.io/cve/CVE-2025-39841",
  "published_at": "2025-09-19T15:26:16.349Z",
  "title": "scsi: lpfc: Fix buffer free/clear order in deferred receive path",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 9.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: lpfc: Fix buffer free/clear order in deferred receive path\n\nFix a use-after-free window by correcting the buffer release sequence in\nthe deferred receive path. The code freed the RQ buffer first and only\nthen cleared the context pointer under the lock. Concurrent paths (e.g.,\nABTS and the repost path) also inspect and release the same pointer under\nthe lock, so the old order could lead to double-free/UAF.\n\nNote that the repost path already uses the correct pattern: detach the\npointer under the lock, then free it after dropping the lock. The\ndeferred path should do the same.",
  "cwe": "CWE-787",
  "cpes": [
    "cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc3:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:6.17:rc4:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "cna": 9.8,
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= 472e146d1cf3410a898b49834500fa9e33ac41a2, \u003c ab34084f42ee06a9028d67c78feafb911d33d111",
          "\u003e= 472e146d1cf3410a898b49834500fa9e33ac41a2, \u003c baa39f6ad79d372a6ce0aa639fbb2f1578479f57",
          "\u003e= 472e146d1cf3410a898b49834500fa9e33ac41a2, \u003c 95b63d15fce5c54a73bbf195e1aacb5a75b128e2",
          "\u003e= 472e146d1cf3410a898b49834500fa9e33ac41a2, \u003c 55658c7501467ca9ef3bd4453dd920010db8bc13",
          "\u003e= 472e146d1cf3410a898b49834500fa9e33ac41a2, \u003c d96cc9a1b57725930c60b607423759d563b4d900",
          "\u003e= 472e146d1cf3410a898b49834500fa9e33ac41a2, \u003c 367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11",
          "\u003e= 472e146d1cf3410a898b49834500fa9e33ac41a2, \u003c 897f64b01c1249ac730329b83f4f40bab71e86c7",
          "\u003e= 472e146d1cf3410a898b49834500fa9e33ac41a2, \u003c 9dba9a45c348e8460da97c450cddf70b2056deb3"
        ],
        "fixed_in": [
          "ab34084f42ee06a9028d67c78feafb911d33d111",
          "baa39f6ad79d372a6ce0aa639fbb2f1578479f57",
          "95b63d15fce5c54a73bbf195e1aacb5a75b128e2",
          "55658c7501467ca9ef3bd4453dd920010db8bc13",
          "d96cc9a1b57725930c60b607423759d563b4d900",
          "367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11",
          "897f64b01c1249ac730329b83f4f40bab71e86c7",
          "9dba9a45c348e8460da97c450cddf70b2056deb3"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "5.1"
        ],
        "fixed_in": [
          "0",
          "5.4.299",
          "5.10.243",
          "5.15.192",
          "6.1.151",
          "6.6.105",
          "6.12.46",
          "6.16.6",
          "6.17"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to ab34084f42ee06a9028d67c78feafb911d33d111 or baa39f6ad79d372a6ce0aa639fbb2f1578479f57 or 95b63d15fce5c54a73bbf195e1aacb5a75b128e2 or 55658c7501467ca9ef3bd4453dd920010db8bc13 or d96cc9a1b57725930c60b607423759d563b4d900 or 367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11 or 897f64b01c1249ac730329b83f4f40bab71e86c7 or 9dba9a45c348e8460da97c450cddf70b2056deb3 or later.",
      "Upgrade Linux to 0 or 5.4.299 or 5.10.243 or 5.15.192 or 6.1.151 or 6.6.105 or 6.12.46 or 6.16.6 or 6.17 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
