From: Zijun Hu <zijun.hu@oss.qualcomm.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
Manish Mandlik <mmandlik@google.com>,
Zijun Hu <zijun_hu@icloud.com>,
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] Bluetooth: coredump: Fix btmon heap-buffer-overflow
Date: Tue, 15 Sep 2026 00:16:39 +0800 [thread overview]
Message-ID: <2e989526-983e-4056-87da-7aad0f79fc98@oss.qualcomm.com> (raw)
In-Reply-To: <CABBYNZJpwkbFB8E4uHu4AcHjtR8R0CKnhj0Zesf1umoLyiqecQ@mail.gmail.com>
On 9/14/2026 10:05 PM, Luiz Augusto von Dentz wrote:
>> Issue:
>> ERROR: AddressSanitizer: heap-buffer-overflow on address 0x51b00000065c at pc 0x7f50b987a029 bp 0x7ffde88dc8d0 sp 0x7ffde88dc088
>> READ of size 17916 at 0x51b00000065c thread T0
>> #0 0x7f50b987a028 in write ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1096
>> #1 0x5b4f3443ae3a in btsnoop_write ../src/shared/btsnoop.c:289
>> #2 0x5b4f3429cbf0 in data_callback ../monitor/control.c:969
>> #3 0x5b4f3444fa9d in mainloop_run ../src/shared/mainloop.c:104
>> #4 0x5b4f34451da6 in mainloop_run_with_signal ../src/shared/mainloop-notify.c:196
>> #5 0x5b4f342953fc in main ../monitor/main.c:303
>> #6 0x7f50b8c2a1c9 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
>> #7 0x7f50b8c2a28a in __libc_start_main_impl ../csu/libc-start.c:360
>> #8 0x5b4f34295ed4 in _start (/usr/bin/btmon+0x29fed4) (BuildId: b41caafb24db693946c283eaea48112186863d2d)
> This probably needs to be fixed in btmon if it attempts to read past
> the buffer size. Also, since it now supports vendor packets that may
Agree, will fix on the btmon side.
> not be limited by HCI packet size, perhaps we should allocate based on
> the channel MTU which probably needs per-vendor configuration to allow
> collecting its vendor packets.
This issue has nothing to do with HCI_VENDOR_PKT (0xff).
This problem has likely existed for a long time across almost every vendor's devcoredump since controller's RAM size almost >= 1490
The root cause is that devcoredump data accumulated from MANY MANY packets is being sent as a SINGLE DIAG packet to monitor channel.
next prev parent reply other threads:[~2026-09-14 16:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 3:42 [PATCH 0/4] Bluetooth: Fix 2 devcoredump bugs and improve event length checks Zijun Hu
2026-09-14 3:42 ` [PATCH 1/4] Bluetooth: coredump: Fix skb leak in hci_devcd_append() stub Zijun Hu
2026-09-14 13:57 ` Luiz Augusto von Dentz
2026-09-14 16:34 ` Zijun Hu
2026-09-14 3:42 ` [PATCH 2/4] Bluetooth: coredump: Fix btmon heap-buffer-overflow Zijun Hu
2026-09-14 14:05 ` Luiz Augusto von Dentz
2026-09-14 16:16 ` Zijun Hu [this message]
2026-09-14 3:42 ` [PATCH 3/4] Bluetooth: hci_event: Use 254 as max LE Meta subevent payload length in hci_le_ev_table[] Zijun Hu
2026-09-14 3:42 ` [PATCH 4/4] Bluetooth: hci_event: Use 252 as max CC event payload length in hci_cc_table[] Zijun Hu
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=2e989526-983e-4056-87da-7aad0f79fc98@oss.qualcomm.com \
--to=zijun.hu@oss.qualcomm.com \
--cc=abhishekpandit@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
--cc=mmandlik@google.com \
--cc=zijun_hu@icloud.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®