From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: James Smart <jsmart2021@gmail.com>,
James Smart <james.smart@broadcom.com>,
Ram Vegesna <ram.vegesna@broadcom.com>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Daniel Wagner <dwagner@suse.de>,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] scsi: elx: libefc: potential use after free in efc_nport_vport_del()
Date: Thu, 22 Aug 2024 21:08:58 -0400 [thread overview]
Message-ID: <yq1ttfckpul.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <b666ab26-6581-4213-9a3d-32a9147f0399@stanley.mountain> (Dan Carpenter's message of "Thu, 15 Aug 2024 14:29:05 +0300")
Dan,
> The kref_put() function will call nport->release if the refcount drops
> to zero. The nport->release release function is _efc_nport_free()
> which frees "nport". But then we dereference "nport" on the next line
> which is a use after free. Re-order these lines to avoid the use after
> free.
Applied to 6.12/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2024-08-23 1:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 11:29 [PATCH] scsi: elx: libefc: potential use after free in efc_nport_vport_del() Dan Carpenter
2024-08-19 6:57 ` Daniel Wagner
2024-08-23 1:08 ` Martin K. Petersen [this message]
2024-08-29 2:50 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yq1ttfckpul.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=dan.carpenter@linaro.org \
--cc=dwagner@suse.de \
--cc=james.smart@broadcom.com \
--cc=jsmart2021@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ram.vegesna@broadcom.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox