CVE-2025-39841: scsi: lpfc: Fix buffer free/clear order in deferred receive path
In the Linux kernel, the following vulnerability has been resolved:
scsi: lpfc: Fix buffer free/clear order in deferred receive path
Fix a use-after-free window by correcting the buffer release sequence in
the deferred receive path. The code freed the RQ buffer first and only
then cleared the context pointer under the lock. Concurrent paths (e.g.,
ABTS and the repost path) also inspect and release the same pointer under
the lock, so the old order could lead to double-free/UAF.
Note that the repost path already uses the correct pattern: detach the
pointer under the lock, then free it after dropping the lock. The
deferred path should do the same.
Security readout for executives and security teams
Plain-English summary
A race condition in the Linux lpfc storage driver can cause the same receive buffer to be released twice or accessed after release. This can corrupt kernel memory and potentially affect confidentiality, integrity, or availability. Exposure depends on whether the affected driver and deferred receive path are actually used.
Executive priority
Treat confirmed lpfc deployments as urgent because kernel memory corruption can disrupt critical storage workloads and carries a critical supplied score. Prioritize exposed production storage systems, but do not assume every Linux host is vulnerable. There is no supplied evidence of active exploitation.
Technical view
The deferred receive path freed an RQ buffer before clearing its shared context pointer under lock. Concurrent ABTS or repost processing could observe that stale pointer and release or access the buffer again, producing a double-free or use-after-free. The correction detaches the pointer while locked and frees the buffer afterward.
Likely exposure
Prioritize Linux systems using the lpfc SCSI driver, particularly those running affected kernel releases identified by their distribution or vendor. The supplied version data includes multiple kernel lines but is not sufficient to map every packaged kernel. Systems without the driver in use are less likely to reach the vulnerable path.
Exploitation context
The supplied CVSS rating is 9.8 and describes network-reachable, low-complexity exploitation without privileges or user interaction. However, the bundle provides no exploit evidence, and the CVE is not listed in KEV. Practical reachability and attacker control over the racing paths are not established by the supplied sources.
Researcher notes
The vulnerability is a concurrency-dependent lifetime error involving shared RQ-buffer ownership. Analysis should focus on the deferred receive, ABTS, and repost paths and whether external traffic can reliably influence their interleaving. The supplied material establishes the faulty ordering and correction, but not exploitability, affected hardware configurations, or reliable attack conditions.
Mitigation direction
Install a vendor-supported kernel containing the applicable stable fix.
Consult distribution or appliance guidance to map packaged kernel versions accurately.
Prioritize storage infrastructure where the lpfc driver is actively used.
Use vendor-supported exposure reductions if immediate kernel replacement is operationally unsafe.
Validation and detection
Inventory running kernel versions and identify systems actively using the lpfc driver.
Compare each packaged kernel with vendor advisories and the applicable stable fix commit.
Confirm updated systems booted into the remediated kernel, not merely installed it.
Retest storage operations and availability after maintenance.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-39841 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
3ADP providers
13Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.