android_kernel_oneplus_msm8998/net/bluetooth
Szymon Janc c288d39159 Bluetooth: Add SMP workaround Microsoft Surface Precision Mouse bug
commit 1d87b88ba26eabd4745e158ecfd87c93a9b51dc2 upstream.

Microsoft Surface Precision Mouse provides bogus identity address when
pairing. It connects with Static Random address but provides Public
Address in SMP Identity Address Information PDU. Address has same
value but type is different. Workaround this by dropping IRK if ID
address discrepancy is detected.

> HCI Event: LE Meta Event (0x3e) plen 19
      LE Connection Complete (0x01)
        Status: Success (0x00)
        Handle: 75
        Role: Master (0x00)
        Peer address type: Random (0x01)
        Peer address: E0:52:33:93:3B:21 (Static)
        Connection interval: 50.00 msec (0x0028)
        Connection latency: 0 (0x0000)
        Supervision timeout: 420 msec (0x002a)
        Master clock accuracy: 0x00

....

> ACL Data RX: Handle 75 flags 0x02 dlen 12
      SMP: Identity Address Information (0x09) len 7
        Address type: Public (0x00)
        Address: E0:52:33:93:3B:21

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Tested-by: Maarten Fonville <maarten.fonville@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=199461
Cc: stable@vger.kernel.org
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-08-04 09:34:53 +02:00
..
bnep Bluetooth: bnep: fix possible might sleep error in bnep_session 2017-08-30 10:19:26 +02:00
cmtp Bluetooth: cmtp: fix possible might sleep error in cmtp_session 2017-08-30 10:19:26 +02:00
hidp Bluetooth: hidp: fix buffer overflow 2019-05-16 19:45:04 +02:00
rfcomm Bluetooth: Fix potential NULL dereference in RFCOMM bind callback 2015-06-06 08:44:33 +02:00
6lowpan.c Bluetooth: 6lowpan: search for destination address in all peers 2019-08-04 09:34:49 +02:00
a2mp.c Bluetooth: Move get info completed callback to a2mp.c 2015-07-30 13:37:22 +02:00
a2mp.h Bluetooth: Add BT_HS config option 2015-07-30 13:31:59 +02:00
af_bluetooth.c net: rename SOCK_ASYNC_NOSPACE and SOCK_ASYNC_WAITDATA 2015-12-01 15:45:05 -05:00
amp.c Bluetooth: Fix breakage in amp_write_rem_assoc_frag() 2015-08-10 20:41:34 +02:00
amp.h Bluetooth: Add BT_HS config option 2015-07-30 13:31:59 +02:00
ecc.c
ecc.h
hci_conn.c Bluetooth: Fix regression with minimum encryption key size alignment 2019-07-10 09:56:33 +02:00
hci_core.c Bluetooth: Send HCI Set Event Mask Page 2 command only when needed 2018-04-13 19:50:21 +02:00
hci_debugfs.c
hci_debugfs.h
hci_event.c Bluetooth: validate BLE connection interval updates 2019-08-04 09:34:49 +02:00
hci_request.c Bluetooth: Fix incorrect removing of IRKs 2016-03-03 15:07:16 -08:00
hci_request.h Bluetooth: Introduce hci_req helper to abort a connection 2015-10-22 11:37:22 +02:00
hci_sock.c Bluetooth: Fix decrementing reference count twice in releasing socket 2019-04-27 09:33:47 +02:00
hci_sysfs.c
Kconfig Bluetooth: Add BT_HS config option 2015-07-30 13:31:59 +02:00
l2cap_core.c Bluetooth: validate BLE connection interval updates 2019-08-04 09:34:49 +02:00
l2cap_sock.c Bluetooth: Fix l2cap_sock_setsockopt() with optname BT_RCVMTU 2016-08-20 18:09:19 +02:00
lib.c Bluetooth: Add BT_WARN and bt_dev_warn logging macros 2015-09-24 16:25:44 +02:00
Makefile Bluetooth: Add BT_HS config option 2015-07-30 13:31:59 +02:00
mgmt.c Bluetooth: SMP: fix crash in unpairing 2018-11-10 07:41:33 -08:00
mgmt_util.c
mgmt_util.h
sco.c Bluetooth: avoid killing an already killed socket 2018-08-22 07:48:37 +02:00
selftest.c
selftest.h
smp.c Bluetooth: Add SMP workaround Microsoft Surface Precision Mouse bug 2019-08-04 09:34:53 +02:00
smp.h Bluetooth: SMP: fix crash in unpairing 2018-11-10 07:41:33 -08:00