linux/net/bluetooth
Johan Hedberg a256a4c200 Bluetooth: Fix handling of unexpected SMP PDUs
commit 8cf9fa1240 upstream.

The conn->smp_chan pointer can be NULL if SMP PDUs arrive at unexpected
moments. To avoid NULL pointer dereferences the code should be checking
for this and disconnect if an unexpected SMP PDU arrives. This patch
fixes the issue by adding a check for conn->smp_chan for all other PDUs
except pairing request and security request (which are are the first
PDUs to come to initialize the SMP context).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-14 10:48:53 -08:00
..
bnep Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cmtp Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hidp Bluetooth: Fix incorrect strncpy() in hidp_setup_hid() 2013-02-03 18:24:41 -06:00
rfcomm Bluetooth: Add missing lock nesting notation 2013-01-11 09:07:17 -08:00
af_bluetooth.c Bluetooth: notify userspace of security level change 2012-05-14 13:51:25 -04:00
hci_conn.c Bluetooth: Fix sending a HCI Authorization Request over LE links 2012-10-02 10:30:34 -07:00
hci_core.c Bluetooth: cancel power_on work when unregistering the device 2013-01-11 09:07:17 -08:00
hci_event.c Bluetooth: Fix sending HCI commands after reset 2013-02-03 18:24:40 -06:00
hci_sock.c Bluetooth: HCI - Fix info leak via getsockname() 2012-10-02 10:29:36 -07:00
hci_sysfs.c Bluetooth: Use proper datatypes in release-callbacks 2012-02-13 17:01:38 +02:00
Kconfig Bluetooth: Fix Kconfig help description 2012-02-29 18:50:25 +02:00
l2cap_core.c Bluetooth: Fix using uninitialized option in RFCMode 2012-12-03 11:46:36 -08:00
l2cap_sock.c Bluetooth: Change signature of smp_conn_security() 2012-10-02 10:30:34 -07:00
lib.c Bluetooth: Add logging functions bt_info and bt_err 2012-02-17 11:33:17 +02:00
Makefile Bluetooth: Always compile SCO and L2CAP in Bluetooth Core 2011-12-21 02:21:08 -02:00
mgmt.c Bluetooth: mgmt: Fix enabling LE while powered off 2012-10-02 10:30:08 -07:00
sco.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
smp.c Bluetooth: Fix handling of unexpected SMP PDUs 2013-02-14 10:48:53 -08:00