CVE-2025-39841

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-39841
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-39841.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-39841
Downstream
Related
Published
2025-09-19T15:26:16.349Z
Modified
2025-11-27T19:34:03.927006Z
Summary
scsi: lpfc: Fix buffer free/clear order in deferred receive path
Details

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/blob/ee626f5d79d5817bb21d6f048dc0da4c4e383443/cves/2025/39xxx/CVE-2025-39841.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
472e146d1cf3410a898b49834500fa9e33ac41a2
Fixed
ab34084f42ee06a9028d67c78feafb911d33d111
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
472e146d1cf3410a898b49834500fa9e33ac41a2
Fixed
baa39f6ad79d372a6ce0aa639fbb2f1578479f57
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
472e146d1cf3410a898b49834500fa9e33ac41a2
Fixed
95b63d15fce5c54a73bbf195e1aacb5a75b128e2
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
472e146d1cf3410a898b49834500fa9e33ac41a2
Fixed
55658c7501467ca9ef3bd4453dd920010db8bc13
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
472e146d1cf3410a898b49834500fa9e33ac41a2
Fixed
d96cc9a1b57725930c60b607423759d563b4d900
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
472e146d1cf3410a898b49834500fa9e33ac41a2
Fixed
367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
472e146d1cf3410a898b49834500fa9e33ac41a2
Fixed
897f64b01c1249ac730329b83f4f40bab71e86c7
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
472e146d1cf3410a898b49834500fa9e33ac41a2
Fixed
9dba9a45c348e8460da97c450cddf70b2056deb3

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.1.0
Fixed
5.4.299
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.243
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.192
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.151
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.105
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.46
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.16.6