From: Marcel Holtmann <marcel@holtmann.org>
To: Laura Abbott <labbott@redhat.com>
Cc: "Gustavo F. Padovan" <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"open list:BLUETOOTH DRIVERS" <linux-bluetooth@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH] Bluetooth: btwilink: Save the packet type before sending
Date: Thu, 22 Sep 2016 21:48:43 +0200 [thread overview]
Message-ID: <D4615527-A180-477F-A944-3AD8CE082DF9@holtmann.org> (raw)
In-Reply-To: <1474568442-4810-1-git-send-email-labbott@redhat.com>
Hi Laura,
> Running with KASAN produces some messages:
>
> BUG: KASAN: use-after-free in ti_st_send_frame+0x9c/0x16c at addr
> ffffffc064868fe8
> Read of size 1 by task kworker/u17:1/1266
>
> <KASAN output trimmed>
>
> Hardware name: HiKey Development Board (DT)
> Workqueue: hci0 hci_cmd_work
> Call trace:
> [<ffffffc00008c00c>] dump_backtrace+0x0/0x178
> [<ffffffc00008c1a4>] show_stack+0x20/0x28
> [<ffffffc00067da38>] dump_stack+0xa8/0xe0
> [<ffffffc000288430>] print_trailer+0x110/0x174
> [<ffffffc00028aedc>] object_err+0x4c/0x5c
> [<ffffffc00028f714>] kasan_report_error+0x254/0x54c
> [<ffffffc00028fa70>] kasan_report+0x64/0x70
> [<ffffffc00028eb8c>] __asan_load1+0x4c/0x54
> [<ffffffc000b59b24>] ti_st_send_frame+0x9c/0x16c
> [<ffffffc000ee8dcc>] hci_send_frame+0xb4/0x118
> [<ffffffc000ee8efc>] hci_cmd_work+0xcc/0x154
> [<ffffffc0000f6c48>] process_one_work+0x26c/0x7a4
> [<ffffffc0000f721c>] worker_thread+0x9c/0x73c
> [<ffffffc000100250>] kthread+0x138/0x154
> [<ffffffc000085c50>] ret_from_fork+0x10/0x40
>
> The packet is being accessed for statistics after it has been freed.
> Save the packet type before sending for statistics afterwards.
>
> Signed-off-by: Laura Abbott <labbott@redhat.com>
> ---
> Originally found and tested on 4.4 based branch.
> ---
> drivers/bluetooth/btwilink.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
patch has been applied to bluetooth-next tree.
Regards
Marcel
prev parent reply other threads:[~2016-09-22 19:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-22 18:20 Laura Abbott
2016-09-22 19:48 ` 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=D4615527-A180-477F-A944-3AD8CE082DF9@holtmann.org \
--to=marcel@holtmann.org \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=john.stultz@linaro.org \
--cc=labbott@redhat.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@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®