]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: MGMT: Add error handling to pair_device()
authorGriffin Kroah-Hartman <griffin@kroah.com>
Thu, 15 Aug 2024 11:51:00 +0000 (13:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Aug 2024 15:36:06 +0000 (17:36 +0200)
commitee0799103b1ae4bcfd80dc11a15df085f6ee1b61
tree7ffcba524a8de8f5f0cece988216779c34575e95
parent4101af98ab573554c4225e328d506fec2a74bc54
Bluetooth: MGMT: Add error handling to pair_device()

commit 538fd3921afac97158d4177139a0ad39f056dbb2 upstream.

hci_conn_params_add() never checks for a NULL value and could lead to a NULL
pointer dereference causing a crash.

Fixed by adding error handling in the function.

Cc: Stable <stable@kernel.org>
Fixes: 5157b8a503fa ("Bluetooth: Fix initializing conn_params in scan phase")
Signed-off-by: Griffin Kroah-Hartman <griffin@kroah.com>
Reported-by: Yiwei Zhang <zhan4630@purdue.edu>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/mgmt.c