zephyr/subsys/bluetooth/host
Pavel Vasilyev 8acb1cc577 bluetooth: host: conn: Check if *conn is not NULL
This commit adds a warning and a Kconfig option to `bt_conn_le_create`
and `bt_conn_le_create_synced` functions which are meant to warn a user
of a potential leakage of an active connection object.

This change is implemented due to frequent incorrect use of the
connection pointer where a pointer to an existing connection object
is overwritten by `bt_conn_le_create` and `bt_conn_le_create_synced`
functions which in turns leads to sporadic critical bugs. See
https://github.com/zephyrproject-rtos/zephyr/pull/78284#discussion_r1754304535
for more details.

The Kconfig option is introduced instead of always returning the error
to not affect current implementations. However, it is recommended to
keep this option enabled to avoid potential bugs.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2024-10-18 17:46:04 +01:00
..
classic Bluetooth: SSP: No MITM if required level is less than L3 2024-10-16 09:59:38 +02:00
shell bluetooth: host: CS support for various HCI commands 2024-10-18 14:15:49 +02:00
addr_internal.h
addr.c
adv.c Bluetooth: Deprecate adv auto-resume 2024-10-08 16:57:01 +02:00
adv.h
aes_ccm.c
att_internal.h tests: bsim: bluetooth: host: att: Add ATT timeout test 2024-10-10 14:59:02 -04:00
att.c bluetooth: host: att: Implement disconnect on ATT timeout 2024-10-10 14:59:02 -04:00
buf_view.h lib: net_buf: rename header file from zephyr/net/buf.h to zephyr/net_buf.h 2024-09-07 11:19:05 -05:00
buf.c bluetooth: host: fix formatter warnings 2024-09-23 10:01:34 +02:00
CMakeLists.txt Bluetooth: Shell: Restructure shell files 2024-09-24 09:21:04 -04:00
conn_internal.h bluetooth: host: CS support for various HCI commands 2024-10-18 14:15:49 +02:00
conn.c bluetooth: host: conn: Check if *conn is not NULL 2024-10-18 17:46:04 +01:00
crypto_psa.c bt-host: add option to use PSA APIs instead of TinyCrypt 2024-06-14 15:41:34 +02:00
crypto_tc.c bt-host: add option to use PSA APIs instead of TinyCrypt 2024-06-14 15:41:34 +02:00
crypto.h
cs.c bluetooth: host: CS support for various HCI commands 2024-10-18 14:15:49 +02:00
data.c
direction_internal.h
direction.c Bluetooth: HCI: Expose bt_hci_per_adv_sync_lookup_handle() 2024-07-27 15:09:00 +03:00
ecc.c Bluetooth: Conditionally print out HCI error codes as strings 2024-07-30 18:25:56 +01:00
ecc.h
gatt_internal.h
gatt.c Bluetooth: GATT: Allow to tune writable device appearance permissions 2024-10-16 16:35:56 +01:00
hci_common.c Bluetooth: hci_common: Add assert on buf allocation 2024-08-12 10:10:48 +02:00
hci_core.c bluetooth: host: CS support for various HCI commands 2024-10-18 14:15:49 +02:00
hci_core.h bluetooth: host: CS support for various HCI commands 2024-10-18 14:15:49 +02:00
hci_ecc.c Bluetooth: Conditionally print out HCI error codes as strings 2024-07-30 18:25:56 +01:00
hci_ecc.h
hci_raw_internal.h lib: net_buf: rename header file from zephyr/net/buf.h to zephyr/net_buf.h 2024-09-07 11:19:05 -05:00
hci_raw.c net: buf: remove use of special putter and getter functions 2024-08-16 09:55:11 +02:00
id.c Bluetooth: Host: Fix issue where uninitialized value was used 2024-10-15 04:07:50 -04:00
id.h
iso_internal.h Bluetooth: ISO: Update includes for ISO files 2024-09-09 13:55:20 -04:00
iso.c Bluetooth: ISO: Add ISO BIS bitfield check macro 2024-10-10 20:22:39 -04:00
Kconfig bluetooth: host: conn: Check if *conn is not NULL 2024-10-18 17:46:04 +01:00
Kconfig.gatt Bluetooth: GATT: Allow to tune writable device appearance permissions 2024-10-16 16:35:56 +01:00
Kconfig.l2cap kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
keys.c
keys.h
l2cap_internal.h
l2cap.c bluetooth: host: l2cap: Check conn state before queueing PDU 2024-10-10 14:59:02 -04:00
long_wq.c
long_wq.h
monitor.c bluetooth: honor log panic mode in monitor 2024-10-02 10:00:26 +02:00
monitor.h
scan.c Bluetooth: Host: Fix unable to start scanning after scan param failure 2024-09-05 12:25:17 +01:00
scan.h Bluetooth: Host: Rework enabling of scanner 2024-08-20 14:54:25 -04:00
settings.c
settings.h
smp_null.c
smp.c Bluetooth: BR: Improve bt_conn_set_bondable 2024-10-02 15:54:30 +02:00
smp.h Bluetooth: Mark bt_<type>_err_to_str() APIs experimental 2024-07-11 13:11:59 -04:00
uuid.c