[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175660626140.2289384.9790485479491589467.b4-ty@oracle.com>
Date: Sat, 30 Aug 2025 22:11:13 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: james.smart@...adcom.com, dick.kennedy@...adcom.com,
James.Bottomley@...senPartnership.com, justintee8345@...il.com,
John Evans <evans1210144@...il.com>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2] scsi: lpfc: Fix buffer free/clear order in deferred receive path
On Thu, 28 Aug 2025 12:40:08 +0800, John Evans wrote:
> 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.
>
> [...]
Applied to 6.17/scsi-fixes, thanks!
[1/1] scsi: lpfc: Fix buffer free/clear order in deferred receive path
https://git.kernel.org/mkp/scsi/c/9dba9a45c348
--
Martin K. Petersen
Powered by blists - more mailing lists