mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Brian Norris <briannorris@chromium.org>
Cc: Amitkumar Karwar <akarwar@marvell.com>,
	Nishant Sarmukadam <nishants@marvell.com>,
	Ganapathi Bhat <gbhat@marvell.com>, Xinming Hu <huxm@marvell.com>,
	<linux-kernel@vger.kernel.org>,
	linux-wireless@vger.kernel.org,
	Brian Norris <briannorris@chromium.org>
Subject: Re: [1/2] mwifiex: fix use-after-free for FW reinit errors
Date: Wed,  5 Apr 2017 12:44:26 +0000 (UTC)	[thread overview]
Message-ID: <20170405124426.83E2360E0E@smtp.codeaurora.org> (raw)
In-Reply-To: <20170328235933.950-1-briannorris@chromium.org>

Brian Norris <briannorris@chromium.org> wrote:
> If we fail to reinit the FW when resetting the device (in the
> synchronous version of mwifiex_init_hw_fw() -> mwifiex_fw_dpc()),
> mwifiex_fw_dpc() will tear down the interface and free up the adapter.
> But we don't actually check for all failure cases of mwifiex_fw_dpc(),
> so some of them fall through and dereference adapter->fw_done with a
> freed adapter, causing a use-after-free bug.
> 
> In any case, mwifiex_fw_dpc() will always signal FW completion -- in the
> error OR success case -- so at best, this was repeat work. Let's not do
> it.
> 
> Signed-off-by: Brian Norris <briannorris@chromium.org>

2 patches applied to wireless-drivers-next.git, thanks.

ce8fad9a1f09 mwifiex: fix use-after-free for FW reinit errors
755b37c93a06 mwifiex: catch mwifiex_fw_dpc() errors properly in reset

-- 
https://patchwork.kernel.org/patch/9650725/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

      parent reply	other threads:[~2017-04-05 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 23:59 [PATCH 1/2] " Brian Norris
2017-03-28 23:59 ` [PATCH 2/2] mwifiex: catch mwifiex_fw_dpc() errors properly in reset Brian Norris
2017-04-05 12:44 ` Kalle Valo [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=20170405124426.83E2360E0E@smtp.codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=akarwar@marvell.com \
    --cc=briannorris@chromium.org \
    --cc=gbhat@marvell.com \
    --cc=huxm@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nishants@marvell.com \
    /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

all inboxes | Powered by JetHome®