[PW_SID:1079876] [v2,net-next] Bluetooth: hci_conn: fix potential UAF in create_big_sync#64
[PW_SID:1079876] [v2,net-next] Bluetooth: hci_conn: fix potential UAF in create_big_sync#64BluezTestBot wants to merge 1 commit intoworkflowfrom
Conversation
Add hci_conn_valid() check in create_big_sync() to detect stale connections before proceeding with BIG creation. Fix create_big_complete() to handle the resulting -ECANCELED error and validate the connection under hci_dev_lock() before dereferencing, following the established pattern used by create_le_conn_complete() and create_pa_complete(). Without this, create_big_complete() would unconditionally dereference the stale conn pointer on error, causing a use-after-free via hci_connect_cfm() and hci_conn_del(). Fixes: eca0ae4 ("Bluetooth: Add initial implementation of BIS connections") Cc: stable@vger.kernel.org Signed-off-by: David Carlier <devnexen@gmail.com>
|
CheckPatch |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
TestRunnerSetup |
|
TestRunner_l2cap-tester |
|
TestRunner_iso-tester |
|
TestRunner_bnep-tester |
|
TestRunner_mgmt-tester |
|
TestRunner_rfcomm-tester |
|
TestRunner_sco-tester |
|
TestRunner_ioctl-tester |
|
TestRunner_mesh-tester |
|
TestRunner_smp-tester |
|
TestRunner_userchan-tester |
|
TestRunner_6lowpan-tester |
|
IncrementalBuild |
Add hci_conn_valid() check in create_big_sync() to detect stale
connections before proceeding with BIG creation. Fix
create_big_complete() to handle the resulting -ECANCELED error
and validate the connection under hci_dev_lock() before
dereferencing, following the established pattern used by
create_le_conn_complete() and create_pa_complete().
Without this, create_big_complete() would unconditionally
dereference the stale conn pointer on error, causing a
use-after-free via hci_connect_cfm() and hci_conn_del().
Fixes: eca0ae4 ("Bluetooth: Add initial implementation of BIS connections")
Cc: stable@vger.kernel.org
Signed-off-by: David Carlier devnexen@gmail.com
v1 -> v2: fix create_big_complete() to handle -ECANCELED and
validate conn under hci_dev_lock(), matching the pattern in
create_le_conn_complete() and create_pa_complete().
v1: https://lore.kernel.org/r/20260408155638.95927-1-devnexen@gmail.com
net/bluetooth/hci_conn.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)