From: Johannes Berg <johannes@sipsolutions.net>
To: Claire Chang <tientzu@chromium.org>,
davem@davemloft.net, kuba@kernel.org, hdegoede@redhat.com,
marcel@holtmann.org
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rfkill: Fix use-after-free in rfkill_resume()
Date: Tue, 10 Nov 2020 18:35:07 +0100 [thread overview]
Message-ID: <3b851462d9bfd914aeb9f5b432e4c076f6c330f3.camel@sipsolutions.net> (raw)
In-Reply-To: <20201110084908.219088-1-tientzu@chromium.org> (sfid-20201110_094924_445207_CC99576F)
On Tue, 2020-11-10 at 16:49 +0800, Claire Chang wrote:
> If a device is getting removed or reprobed during resume, use-after-free
> might happen. For example, h5_btrtl_resume()[drivers/bluetooth/hci_h5.c]
> schedules a work queue for device reprobing. During the reprobing, if
> rfkill_set_block() in rfkill_resume() is called after the corresponding
> *_unregister() and kfree() are called, there will be an use-after-free
> in hci_rfkill_set_block()[net/bluetooth/hci_core.c].
Not sure I understand. So you're saying
* something (h5_btrtl_resume) schedules a worker
* said worker run, when it runs, calls rfkill_unregister()
* somehow rfkill_resume() still gets called after this
But that can't really be right, device_del() removes it from the PM
lists?
johannes
next prev parent reply other threads:[~2020-11-10 17:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 8:49 Claire Chang
2020-11-10 17:35 ` Johannes Berg [this message]
2020-11-11 3:23 ` Claire Chang
2020-11-12 8:17 ` Johannes Berg
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=3b851462d9bfd914aeb9f5b432e4c076f6c330f3.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=hdegoede@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
--cc=tientzu@chromium.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
all inboxes | Powered by JetHome®