]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix missing check for SMP session in smp_user_confirm_reply
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 27 Jun 2014 11:23:06 +0000 (14:23 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 3 Jul 2014 15:42:47 +0000 (17:42 +0200)
commit68b0ad6f3b1ca90b22ba39b9bc29d17b6fb2e5f7
tree5d814c6133886cf700b1e7653c7c1a536149d540
parent65b376d0fdcca43730ef01c647fbb4a6b9082788
Bluetooth: Fix missing check for SMP session in smp_user_confirm_reply

The smp_user_confirm_reply() function is called whenever user space
sends a user confirmation reply mgmt command. In case of a misbehaving
user space, or if the SMP session was removed by the time the command
comes it is important that we return an appropriate error and do not try
to access the non-existent SMP context. This patch adds the appropriate
check for the HCI_CONN_LE_SMP_PEND flag before proceeding further.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c