{"id":"CVE-2025-39841","aliases":["CVE-2025-39841"],"related":[],"kind":"vulnerability","state":"published","title":"scsi: lpfc: Fix buffer free/clear order in deferred receive path","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nscsi: lpfc: Corregir el orden de liberación/borrado del búfer en la ruta de recepción diferida\n\nCorregir una ventana de uso después de liberación corrigiendo la secuencia de liberación del búfer en la ruta de recepción diferida. El código liberaba primero el búfer RQ y solo entonces borraba el puntero de contexto bajo el bloqueo. Rutas concurrentes (p. ej., ABTS y la ruta de republicación) también inspeccionan y liberan el mismo puntero bajo el bloqueo, por lo que el orden antiguo podría llevar a una doble liberación/UAF.\n\nTenga en cuenta que la ruta de republicación ya utiliza el patrón correcto: desvincular el puntero bajo el bloqueo, luego liberarlo después de soltar el bloqueo. La ruta diferida debería hacer lo mismo.","source":"nvd"}],"published":"2025-09-19T15:26:16.349Z","modified":"2026-10-19T21:10:00.160Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":9.8,"rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"472e146d1cf3410a898b49834500fa9e33ac41a2","fixed":"ab34084f42ee06a9028d67c78feafb911d33d111","status":"affected"},{"type":"git","introduced":"472e146d1cf3410a898b49834500fa9e33ac41a2","fixed":"baa39f6ad79d372a6ce0aa639fbb2f1578479f57","status":"affected"},{"type":"git","introduced":"472e146d1cf3410a898b49834500fa9e33ac41a2","fixed":"95b63d15fce5c54a73bbf195e1aacb5a75b128e2","status":"affected"},{"type":"git","introduced":"472e146d1cf3410a898b49834500fa9e33ac41a2","fixed":"55658c7501467ca9ef3bd4453dd920010db8bc13","status":"affected"},{"type":"git","introduced":"472e146d1cf3410a898b49834500fa9e33ac41a2","fixed":"d96cc9a1b57725930c60b607423759d563b4d900","status":"affected"},{"type":"git","introduced":"472e146d1cf3410a898b49834500fa9e33ac41a2","fixed":"367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11","status":"affected"},{"type":"git","introduced":"472e146d1cf3410a898b49834500fa9e33ac41a2","fixed":"897f64b01c1249ac730329b83f4f40bab71e86c7","status":"affected"},{"type":"git","introduced":"472e146d1cf3410a898b49834500fa9e33ac41a2","fixed":"9dba9a45c348e8460da97c450cddf70b2056deb3","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.1","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.1","status":"unaffected"},{"type":"semver","introduced":"5.4.299","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.243","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.192","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.151","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.105","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.46","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.16.6","lastAffected":"6.16.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.17","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.1","fixed":"5.4.299"},{"status":"affected","introduced":"5.5","fixed":"5.10.243"},{"status":"affected","introduced":"5.11","fixed":"5.15.192"},{"status":"affected","introduced":"5.16","fixed":"6.1.151"},{"status":"affected","introduced":"6.2","fixed":"6.6.105"},{"status":"affected","introduced":"6.7","fixed":"6.12.46"},{"status":"affected","introduced":"6.13","fixed":"6.16.6"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"},{"status":"affected","version":"6.17"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ab34084f42ee06a9028d67c78feafb911d33d111","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/baa39f6ad79d372a6ce0aa639fbb2f1578479f57","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/95b63d15fce5c54a73bbf195e1aacb5a75b128e2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/55658c7501467ca9ef3bd4453dd920010db8bc13","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d96cc9a1b57725930c60b607423759d563b4d900","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/897f64b01c1249ac730329b83f4f40bab71e86c7","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9dba9a45c348e8460da97c450cddf70b2056deb3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html","tags":["mailing-list","third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-089022.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-06-10T20:42:00.721Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-39841","url":"https://www.cve.org/CVERecord?id=CVE-2025-39841","licence":"CVE Terms of Use","modified":"2026-08-05T12:05:34.724Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-39841","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-39841","licence":"Public domain","modified":"2026-10-19T21:10:00.160Z"}],"updatedAt":"2026-11-25T22:59:04.860Z","epss":{"score":0.00727,"percentile":0.50093,"date":"2026-11-30T12:00:22.000Z"}}