linux/net/bluetooth
Luiz Augusto von Dentz c1ad9bb3b0 Bluetooth: Disconnect if E0 is used for Level 4
commit 8746f135bb upstream.

E0 is not allowed with Level 4:

BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1319:

  '128-bit equivalent strength for link and encryption keys
   required using FIPS approved algorithms (E0 not allowed,
   SAFER+ not allowed, and P-192 not allowed; encryption key
   not shortened'

SC enabled:

> HCI Event: Read Remote Extended Features (0x23) plen 13
        Status: Success (0x00)
        Handle: 256
        Page: 1/2
        Features: 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          Secure Simple Pairing (Host Support)
          LE Supported (Host)
          Secure Connections (Host Support)
> HCI Event: Encryption Change (0x08) plen 4
        Status: Success (0x00)
        Handle: 256
        Encryption: Enabled with AES-CCM (0x02)

SC disabled:

> HCI Event: Read Remote Extended Features (0x23) plen 13
        Status: Success (0x00)
        Handle: 256
        Page: 1/2
        Features: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00
          Secure Simple Pairing (Host Support)
          LE Supported (Host)
> HCI Event: Encryption Change (0x08) plen 4
        Status: Success (0x00)
        Handle: 256
        Encryption: Enabled with E0 (0x01)
[May 8 20:23] Bluetooth: hci0: Invalid security: expect AES but E0 was used
< HCI Command: Disconnect (0x01|0x0006) plen 3
        Handle: 256
        Reason: Authentication Failure (0x05)

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-17 10:12:57 +02:00
..
bnep
cmtp
hidp Bluetooth: hidp: fix buffer overflow 2019-05-10 17:54:11 +02:00
rfcomm Bluetooth: RFCOMM: fix ODEBUG bug in rfcomm_dev_ioctl 2020-04-13 10:45:14 +02:00
6lowpan.c Bluetooth: add a mutex lock to avoid UAF in do_enale_set 2020-08-19 08:14:50 +02:00
a2mp.c Bluetooth: A2MP: Fix not initializing all members 2020-10-17 10:12:56 +02:00
a2mp.h
af_bluetooth.c net: use skb_queue_empty_lockless() in poll() handlers 2019-11-10 11:27:48 +01:00
amp.c
amp.h
ecdh_helper.c
ecdh_helper.h
hci_conn.c Bluetooth: Disconnect if E0 is used for Level 4 2020-10-17 10:12:57 +02:00
hci_core.c Bluetooth: hci_core: fix init for HCI_USER_CHANNEL 2019-12-31 16:35:19 +01:00
hci_debugfs.c
hci_debugfs.h
hci_event.c Bluetooth: Disconnect if E0 is used for Level 4 2020-10-17 10:12:57 +02:00
hci_request.c Bluetooth: Fix advertising duplicated flags 2019-12-31 16:35:34 +01:00
hci_request.h Bluetooth: Ignore CC events not matching the last HCI command 2019-05-31 06:46:09 -07:00
hci_sock.c Bluetooth: Fix race condition in hci_release_sock() 2020-02-05 14:43:39 +00:00
hci_sysfs.c
Kconfig
l2cap_core.c Bluetooth: L2CAP: Fix calling sk_filter on non-socket based channel 2020-10-17 10:12:56 +02:00
l2cap_sock.c Bluetooth: L2CAP: Fix calling sk_filter on non-socket based channel 2020-10-17 10:12:56 +02:00
leds.c
leds.h
lib.c
Makefile
mgmt_util.c
mgmt_util.h
mgmt.c Bluetooth: MGMT: Fix not checking if BT_HS is enabled 2020-10-17 10:12:57 +02:00
sco.c Bluetooth: Fix locking in bt_accept_enqueue() for BH context 2019-03-10 07:17:21 +01:00
selftest.c
selftest.h
smp.c Bluetooth: Add SMP workaround Microsoft Surface Precision Mouse bug 2019-07-26 09:14:30 +02:00
smp.h