{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-39841","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2025-04-16T07:20:57.141Z","datePublished":"2025-09-19T15:26:16.349Z","dateUpdated":"2026-08-05T12:05:34.724Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T12:05:34.724Z"},"descriptions":[{"lang":"en","value":"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."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":9.8,"baseSeverity":"CRITICAL"},"scenarios":[{"lang":"en","value":"AV:N - The vulnerable code is the lpfc NVMe-over-Fibre-Channel target's receive path, processing FCP command and ABTS frames sent by a remote NVMe-oF initiator peer, directly analogous to nvmet-tcp; FC fabrics are also routable across sites via FCIP/inter-fabric routing and FCoE. Repo precedent (CVE-2026-43414, qla2xxx FC) scores FC-peer-triggered driver memory corruption as Network.\nAC:L - The remote initiator controls both sides of the race — it forces the deferred path by flooding the queue past its fod count (-EOVERFLOW) and drives lpfc_nvmet_ctxbuf_post() concurrently by sending ABTS for the same exchange — and can retry at FC line rate until the unlocked free/clear window is hit.\nPR:N - NVMe/FC provides no transport authentication and no TLS; hostnqn-based allow-lists are an authorization filter that a fabric-attached attacker can spoof, and ABTS frames reaching lpfc_nvmet_rcv_unsol_abort() require no established association at all. No privileges on the target host are needed.\nUI:N - The race is triggered entirely by inbound FC frames processed asynchronously in the driver's interrupt/completion and workqueue contexts. No administrator or user action on the target system is required.\nS:U - The double-free and use-after-free corrupt kernel heap and DMA-pool state within the target host's own kernel security authority. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - The freed rqb_dmabuf is re-read after kfree() (rqb_entry->hrq->rqbp, hbuf.phys/dbuf.phys), and the double dma_pool_free() lets the same DMA buffer be handed to two live exchanges, so one initiator's data lands in another's buffer. Heap grooming around the freed slab object yields an arbitrary-read primitive.\nI:H - lpfc_rq_buf_free() performs a list_del() write into the freed object and re-posts stale DMA addresses to the hardware RQ, causing the HBA to DMA attacker-supplied FC frame content into freed/reallocated kernel memory — a remote, attacker-controlled kernel write primitive, plus double-free-based heap control.\nA:H - The double kfree()/dma_pool_free() and freed-list corruption reliably produce slab corruption, BUG_ON in the allocator, or an oops in the interrupt-context completion handler, panicking the storage target host."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/lpfc/lpfc_nvmet.c"],"versions":[{"version":"472e146d1cf3410a898b49834500fa9e33ac41a2","lessThan":"ab34084f42ee06a9028d67c78feafb911d33d111","status":"affected","versionType":"git"},{"version":"472e146d1cf3410a898b49834500fa9e33ac41a2","lessThan":"baa39f6ad79d372a6ce0aa639fbb2f1578479f57","status":"affected","versionType":"git"},{"version":"472e146d1cf3410a898b49834500fa9e33ac41a2","lessThan":"95b63d15fce5c54a73bbf195e1aacb5a75b128e2","status":"affected","versionType":"git"},{"version":"472e146d1cf3410a898b49834500fa9e33ac41a2","lessThan":"55658c7501467ca9ef3bd4453dd920010db8bc13","status":"affected","versionType":"git"},{"version":"472e146d1cf3410a898b49834500fa9e33ac41a2","lessThan":"d96cc9a1b57725930c60b607423759d563b4d900","status":"affected","versionType":"git"},{"version":"472e146d1cf3410a898b49834500fa9e33ac41a2","lessThan":"367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11","status":"affected","versionType":"git"},{"version":"472e146d1cf3410a898b49834500fa9e33ac41a2","lessThan":"897f64b01c1249ac730329b83f4f40bab71e86c7","status":"affected","versionType":"git"},{"version":"472e146d1cf3410a898b49834500fa9e33ac41a2","lessThan":"9dba9a45c348e8460da97c450cddf70b2056deb3","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/lpfc/lpfc_nvmet.c"],"versions":[{"version":"5.1","status":"affected"},{"version":"0","lessThan":"5.1","status":"unaffected","versionType":"semver"},{"version":"5.4.299","lessThanOrEqual":"5.4.*","status":"unaffected","versionType":"semver"},{"version":"5.10.243","lessThanOrEqual":"5.10.*","status":"unaffected","versionType":"semver"},{"version":"5.15.192","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.151","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.105","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.12.46","lessThanOrEqual":"6.12.*","status":"unaffected","versionType":"semver"},{"version":"6.16.6","lessThanOrEqual":"6.16.*","status":"unaffected","versionType":"semver"},{"version":"6.17","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.4.299"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.10.243"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"5.15.192"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.1.151"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.6.105"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.12.46"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.16.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.1","versionEndExcluding":"6.17"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/ab34084f42ee06a9028d67c78feafb911d33d111"},{"url":"https://git.kernel.org/stable/c/baa39f6ad79d372a6ce0aa639fbb2f1578479f57"},{"url":"https://git.kernel.org/stable/c/95b63d15fce5c54a73bbf195e1aacb5a75b128e2"},{"url":"https://git.kernel.org/stable/c/55658c7501467ca9ef3bd4453dd920010db8bc13"},{"url":"https://git.kernel.org/stable/c/d96cc9a1b57725930c60b607423759d563b4d900"},{"url":"https://git.kernel.org/stable/c/367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11"},{"url":"https://git.kernel.org/stable/c/897f64b01c1249ac730329b83f4f40bab71e86c7"},{"url":"https://git.kernel.org/stable/c/9dba9a45c348e8460da97c450cddf70b2056deb3"}],"title":"scsi: lpfc: Fix buffer free/clear order in deferred receive path","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2025-11-03T17:43:56.756Z"}},{"x_adpType":"supplier","providerMetadata":{"orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","shortName":"siemens-SADP","dateUpdated":"2026-05-12T12:07:28.917Z"},"affected":[{"vendor":"Siemens","product":"RUGGEDCOM RST2428P","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XCH328","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XCM324","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XCM328","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XCM332","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRH334 (24 V DC, 8xFO, CC)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (230 V AC, 12xFO)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (230 V AC, 8xFO)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (230V AC, 2x10G, 24xSFP, 8xSFP+)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (24 V DC, 12xFO)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (24 V DC, 8xFO)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (24V DC, 2x10G, 24xSFP, 8xSFP+)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (2x230 V AC, 12xFO)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (2x230 V AC, 8xFO)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SCALANCE XRM334 (2x230V AC, 2x10G, 24xSFP, 8xSFP+)","versions":[{"status":"affected","version":"0","lessThan":"V3.3","versionType":"custom"}],"defaultStatus":"unknown"},{"vendor":"Siemens","product":"SIMATIC CN 4100","versions":[{"status":"affected","version":"0","lessThan":"V5.0","versionType":"custom"}],"defaultStatus":"unknown"}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-089022.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-032379.html"}]},{"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2025-39841","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2026-06-10T20:42:00.721283Z"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2026-06-11T18:44:18.587Z"}}]}}