CVE-2025-39841

scsi: lpfc: Fix buffer free/clear order in deferred receive path

State
Published
Severity
9.8 Critical
Published
Sep 19, 2025
Updated
Aug 5, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

Description

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.

Scores

CVSSScoreVectorSource
3.19.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 472e146d1cf3410a898b49834500fa9e33ac41a2 to before ab34084f42ee06a9028d67c78feafb911d33d111Affected
  • 472e146d1cf3410a898b49834500fa9e33ac41a2 to before baa39f6ad79d372a6ce0aa639fbb2f1578479f57Affected
  • 472e146d1cf3410a898b49834500fa9e33ac41a2 to before 95b63d15fce5c54a73bbf195e1aacb5a75b128e2Affected
  • 472e146d1cf3410a898b49834500fa9e33ac41a2 to before 55658c7501467ca9ef3bd4453dd920010db8bc13Affected
  • 472e146d1cf3410a898b49834500fa9e33ac41a2 to before d96cc9a1b57725930c60b607423759d563b4d900Affected
  • 472e146d1cf3410a898b49834500fa9e33ac41a2 to before 367cb5ffd8a8a4c85dc89f55e7fa7cc191425b11Affected
  • 472e146d1cf3410a898b49834500fa9e33ac41a2 to before 897f64b01c1249ac730329b83f4f40bab71e86c7Affected
  • 472e146d1cf3410a898b49834500fa9e33ac41a2 to before 9dba9a45c348e8460da97c450cddf70b2056deb3Affected
LinuxLinux
  • 5.1Affected
  • before 5.1Not affected
  • 5.4.299 through 5.4.*Not affected
  • 5.10.243 through 5.10.*Not affected
  • 5.15.192 through 5.15.*Not affected
  • 6.1.151 through 6.1.*Not affected
  • 6.6.105 through 6.6.*Not affected
  • 6.12.46 through 6.12.*Not affected
  • 6.16.6 through 6.16.*Not affected
  • 6.17 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.