From: Johannes Thumshirn <jthumshirn@suse.de>
To: Sebastian Herbszt <herbszt@gmx.de>
Cc: James Smart <james.smart@avagotech.com>,
Dick Kennedy <dick.kennedy@avagotech.com>,
"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: Tue, 18 Aug 2015 08:36:29 +0200 [thread overview]
Message-ID: <mqdfv3h5cia.fsf@c203.arch.suse.de> (raw)
In-Reply-To: <20150817232634.00006d80@localhost> (Sebastian Herbszt's message of "Mon, 17 Aug 2015 23:26:34 +0200")
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
next prev parent reply other threads:[~2015-08-18 6:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-17 11:03 Johannes Thumshirn
2015-08-17 21:26 ` Sebastian Herbszt
2015-08-18 6:36 ` Johannes Thumshirn [this message]
2015-08-18 22:27 ` Sebastian Herbszt
2015-08-31 20:53 ` James Smart
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=mqdfv3h5cia.fsf@c203.arch.suse.de \
--to=jthumshirn@suse.de \
--cc=JBottomley@odin.com \
--cc=colin.king@canonical.com \
--cc=dick.kennedy@avagotech.com \
--cc=herbszt@gmx.de \
--cc=james.smart@avagotech.com \
--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
Powered by JetHome