1
0
Fork 0
remarkable-linux/net/bluetooth
Ben Seri 6aebc2670e Bluetooth: Prevent stack info leak from the EFS element.
commit 06e7e776ca upstream.

In the function l2cap_parse_conf_rsp and in the function
l2cap_parse_conf_req the following variable is declared without
initialization:

struct l2cap_conf_efs efs;

In addition, when parsing input configuration parameters in both of
these functions, the switch case for handling EFS elements may skip the
memcpy call that will write to the efs variable:

...
case L2CAP_CONF_EFS:
if (olen == sizeof(efs))
memcpy(&efs, (void *)val, olen);
...

The olen in the above if is attacker controlled, and regardless of that
if, in both of these functions the efs variable would eventually be
added to the outgoing configuration request that is being built:

l2cap_add_conf_opt(&ptr, L2CAP_CONF_EFS, sizeof(efs), (unsigned long) &efs);

So by sending a configuration request, or response, that contains an
L2CAP_CONF_EFS element, but with an element length that is not
sizeof(efs) - the memcpy to the uninitialized efs variable can be
avoided, and the uninitialized variable would be returned to the
attacker (16 bytes).

This issue has been assigned CVE-2017-1000410

Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo Padovan <gustavo@padovan.org>
Cc: Johan Hedberg <johan.hedberg@gmail.com>
Signed-off-by: Ben Seri <ben@armis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-17 09:38:56 +01:00
..
bnep Bluetooth: bnep: fix possible might sleep error in bnep_session 2017-08-30 10:21:52 +02:00
cmtp Bluetooth: cmtp: fix possible might sleep error in cmtp_session 2017-08-30 10:21:52 +02:00
hidp Bluetooth: hidp: fix possible might sleep error in hidp_session_thread 2017-08-30 10:21:52 +02:00
rfcomm Bluetooth: Fix using the correct source address type 2016-11-22 22:50:46 +01:00
6lowpan.c Bluetooth: Fix using the correct source address type 2016-11-22 22:50:46 +01:00
Kconfig Bluetooth: add LED trigger for indicating HCI is powered up 2016-02-23 20:29:35 +01:00
Makefile Bluetooth: add LED trigger for indicating HCI is powered up 2016-02-23 20:29:35 +01: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 Bluetooth: Use numbers for subsystem version string 2016-09-19 20:19:34 +02: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 Bluetooth: Add ECC library for LE Secure Connections 2014-12-03 16:51:16 +01:00
ecc.h Bluetooth: Add ECC library for LE Secure Connections 2014-12-03 16:51:16 +01:00
hci_conn.c Bluetooth: Fix using the correct source address type 2016-11-22 22:50:46 +01:00
hci_core.c Bluetooth: Fix wrong New Settings event when closing HCI User Channel 2016-09-19 20:19:34 +02:00
hci_debugfs.c Bluetooth: Add debugfs fields for hardware and firmware info 2016-07-18 09:33:28 +03:00
hci_debugfs.h Bluetooth: Provide option to enable/disable debugfs information 2015-02-15 18:54:13 +02:00
hci_event.c Bluetooth: Add Authentication Failed reason to Disconnected Mgmt event 2016-07-13 08:32:12 +03:00
hci_request.c Bluetooth: Fix append max 11 bytes of name to scan rsp data 2016-10-19 18:42:37 +02:00
hci_request.h Bluetooth: Fix append max 11 bytes of name to scan rsp data 2016-10-19 18:42:37 +02:00
hci_sock.c Bluetooth: Fix user channel for 32bit userspace on 64bit kernel 2017-05-20 14:28:41 +02:00
hci_sysfs.c Bluetooth: Remove controller device attributes 2016-07-09 21:37:11 +03:00
l2cap_core.c Bluetooth: Prevent stack info leak from the EFS element. 2018-01-17 09:38:56 +01:00
l2cap_sock.c Bluetooth: split sk_filter in l2cap_sock_recv_cb 2016-08-24 16:55:04 +02:00
leds.c Bluetooth: Add combined LED trigger for controller power 2016-09-19 20:19:34 +02:00
leds.h Bluetooth: Add combined LED trigger for controller power 2016-09-19 20:19:34 +02:00
lib.c Bluetooth: Add BT_WARN and bt_dev_warn logging macros 2015-09-24 16:25:44 +02:00
mgmt.c Bluetooth: Fix append max 11 bytes of name to scan rsp data 2016-10-19 18:42:37 +02:00
mgmt_util.c Bluetooth: Add support for sending MGMT commands and events to monitor 2016-09-19 20:19:34 +02:00
mgmt_util.h Bluetooth: Add generic mgmt helper API 2015-03-17 18:03:08 +01:00
sco.c Bluetooth: Fix using the correct source address type 2016-11-22 22:50:46 +01:00
selftest.c Bluetooth: Export ECDH selftest result in debugfs 2015-04-02 08:47:38 +03:00
selftest.h Bluetooth: Add support for self testing framework 2014-12-30 08:53:55 +02:00
smp.c Bluetooth: use constant time memory comparison for secret values 2017-07-27 15:07:58 -07:00
smp.h Bluetooth: Fix crash in SMP when unpairing 2015-10-22 09:02:03 +02:00