From: James Smart <james.smart@avagotech.com>
To: Sebastian Herbszt <herbszt@gmx.de>,
Johannes Thumshirn <jthumshirn@suse.de>,
Dick Kennedy <dick.kennedy@avagotech.com>
Cc: "James E.J. Bottomley" <JBottomley@odin.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
Colin King <colin.king@canonical.com>
Subject: Re: [PATCH] lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2()
Date: Mon, 31 Aug 2015 16:53:37 -0400 [thread overview]
Message-ID: <55E4BED1.7050201@avagotech.com> (raw)
In-Reply-To: <20150819002751.00000f06@localhost>
On 8/18/2015 6:27 PM, Sebastian Herbszt wrote:
> Johannes Thumshirn wrote:
>> Sebastian Herbszt <herbszt@gmx.de> writes:
>>
>>> Johannes Thumshirn wrote:
>>>> If the bf_get() call in lpfc_mbx_cmpl_rdp_page_a2() does succeeds, execution
>>>> continues normally and mp gets kfree()d.
>>>>
>>>> If the subsequent call to lpfc_sli_issue_mbox() fails execution jumps to the
>>>> error label where lpfc_mbuf_free() is called with mp->virt and mp->phys as
>>>> function arguments. This is the use after free. Following the use after free mp
>>>> gets kfree()d again which is a double free.
>>> A similar patch was posted by Colin Ian King on 2015-07-31 [1].
>>>
>>> [1] http://marc.info/?l=linux-scsi&m=143835937206204&w=2
>> OK,
>>
>> Is it already in James' tree (haven't checked)? The problematic code was
>> merged for 4.2-rc1 so if the fix (Collin's or mine I don't care) could go
>> in while we're still in the rc phase, we could avoid all that stable
>> circus.
>>
>> Thanks for digging this out.
>>
>> Byte,
>> Johannes
> It is not yet in scsi.git.
>
> James S., Dick, which patch do you prefer?
>
> Sebastian
I looked at both and liked Johannes patch better.
-- james s
prev parent reply other threads:[~2015-08-31 20:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-17 11:03 [PATCH] lpfc: Fix possible use-after-free and double free in lpfc_mbx_cmpl_rdp_page_a2() Johannes Thumshirn
2015-08-17 21:26 ` Sebastian Herbszt
2015-08-18 6:36 ` Johannes Thumshirn
2015-08-18 22:27 ` Sebastian Herbszt
2015-08-31 20:53 ` James Smart [this message]
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=55E4BED1.7050201@avagotech.com \
--to=james.smart@avagotech.com \
--cc=JBottomley@odin.com \
--cc=colin.king@canonical.com \
--cc=dick.kennedy@avagotech.com \
--cc=herbszt@gmx.de \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).