nuttx/wireless/bluetooth
AbhinavMir a79734d6df
Some checks are pending
MemBrowse Memory Report / changes-filter (push) Waiting to run
MemBrowse Memory Report / load-targets (push) Waiting to run
MemBrowse Memory Report / identical (push) Blocked by required conditions
MemBrowse Memory Report / analyze (push) Blocked by required conditions
wireless/bluetooth/bt_hcicore.c: Balance conn and buffer refs in hci_acl().
hci_acl() looked up the connection with bt_conn_lookup_handle(), which
returns a new reference, but never released it. This leaked one conn
reference for every received ACL packet.

bt_conn_receive() also consumes the buffer on every path: it forwards
to l2cap (which releases) or stores the buffer in conn->rx without an
addref. The hci_rx_work() worker then called bt_buf_release() on the
same buffer, which caused a double free or use-after-free.

Take an extra buffer reference for the worker to release, and release
the connection reference from the lookup.

Assisted-by: Fable
Signed-off-by: AbhinavMir <atg271@gmail.com>
2026-08-15 11:51:19 +08:00
..
bt_atomic.h arch_atomic: only support atomic_xx and atomic64_xx function 2024-12-04 14:03:14 +01:00
bt_att.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_att.h wireless: migrate to SPDX identifier 2024-09-11 19:49:34 +08:00
bt_buf.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_buf.h wireless: migrate to SPDX identifier 2024-09-11 19:49:34 +08:00
bt_conn.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_conn.h style: Fix "the the" typo across the codebase. 2026-03-23 11:07:49 +01:00
bt_gatt.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_hcicore.c wireless/bluetooth/bt_hcicore.c: Balance conn and buffer refs in hci_acl(). 2026-08-15 11:51:19 +08:00
bt_hcicore.h bluetooth: set bt_driver_register/unregister to xx_set/unset 2024-10-17 18:09:32 +08:00
bt_ioctl.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_ioctl.h wireless: migrate to SPDX identifier 2024-09-11 19:49:34 +08:00
bt_keys.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_keys.h Bluetooth SMP: added support for Legacy pairing (MITM) with passkey 2025-05-28 21:49:08 +08:00
bt_l2cap.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_l2cap.h wireless: migrate to SPDX identifier 2024-09-11 19:49:34 +08:00
bt_netdev.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_queue.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_queue.h wireless: migrate to SPDX identifier 2024-09-11 19:49:34 +08:00
bt_services.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_smp.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
bt_smp.h Bluetooth SMP: added support for Legacy pairing (MITM) with passkey 2025-05-28 21:49:08 +08:00
bt_uuid.c wireless: migrate to SPDX identifier 2024-09-11 19:49:34 +08:00
CMakeLists.txt bt_atomic: use atomic macro to replace wireless/bluetooth/bt_atomic.c 2024-12-04 13:54:45 +08:00
Kconfig Bluetooth SMP: added support for Legacy pairing (MITM) with passkey 2025-05-28 21:49:08 +08:00
Make.defs bt_atomic: use atomic macro to replace wireless/bluetooth/bt_atomic.c 2024-12-04 13:54:45 +08:00