From: Marcel Holtmann <marcel@holtmann.org>
To: Michael Scott <michael.scott@linaro.org>
Cc: "Gustavo F. Padovan" <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jukka Rissanen <jukka.rissanen@linux.intel.com>,
linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] bluetooth: 6lowpan: fix use after free in chan_suspend/resume
Date: Fri, 31 Mar 2017 12:10:27 +0200 [thread overview]
Message-ID: <2B4AB0D3-D55D-4F3F-ACA6-F82DC680316E@holtmann.org> (raw)
In-Reply-To: <20170329061018.4243-1-michael.scott@linaro.org>
Hi Michael,
> A status field in the skb_cb struct was storing a channel status
> based on channel suspend/resume events. This stored status was
> then used to return EAGAIN if there were packet sending issues
> in snd_pkt().
>
> The issue is that the skb has been freed by the time the callback
> to 6lowpan's suspend/resume was called. So, this generates a
> "use after free" issue that was noticed while running kernel tests
> with KASAN debug enabled.
>
> Let's eliminate the status field entirely as we can use the channel
> tx_credits to indicate whether we should return EAGAIN when handling
> packets.
>
> Signed-off-by: Michael Scott <michael.scott@linaro.org>
> ---
> net/bluetooth/6lowpan.c | 21 +++------------------
> 1 file changed, 3 insertions(+), 18 deletions(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
prev parent reply other threads:[~2017-03-31 10:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 6:10 Michael Scott
2017-03-31 8:33 ` Luiz Augusto von Dentz
2017-03-31 9:35 ` Jukka Rissanen
2017-03-31 10:10 ` Marcel Holtmann [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=2B4AB0D3-D55D-4F3F-ACA6-F82DC680316E@holtmann.org \
--to=marcel@holtmann.org \
--cc=davem@davemloft.net \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=jukka.rissanen@linux.intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=michael.scott@linaro.org \
--cc=netdev@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
all inboxes | Powered by JetHome®