android_kernel_google_msm/include/net/bluetooth
David Herrmann 1528eb776d Bluetooth: hidp: verify l2cap sockets
commit b3916db32c upstream.

We need to verify that the given sockets actually are l2cap sockets. If
they aren't, we are not supposed to access bt_sk(sock) and we shouldn't
start the session if the offsets turn out to be valid local BT addresses.

That is, if someone passes a TCP socket to HIDCONNADD, then we access some
random offset in the TCP socket (which isn't even guaranteed to be valid).

Fix this by checking that the socket is an l2cap socket.

Change-Id: I401bca741588b34876a1c835d8d4567852b4ec75
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2018-01-13 17:14:28 +03:00
..
amp.h Update copyright to The Linux Foundation 2013-03-15 17:07:39 -07:00
bluetooth.h Bluetooth: Introduce new security level 2013-03-15 17:08:18 -07:00
hci.h Update copyright to The Linux Foundation 2013-03-15 17:07:39 -07:00
hci_core.h Update copyright to The Linux Foundation 2013-03-15 17:07:39 -07:00
l2cap.h Bluetooth: hidp: verify l2cap sockets 2018-01-13 17:14:28 +03:00
mgmt.h Bluetooth: Fix for LE cancel Create Connection not working 2013-03-15 17:06:40 -07:00
rfcomm.h Revert upstream bluetooth 2013-02-25 11:37:04 -08:00
sco.h Update copyright to The Linux Foundation 2013-03-15 17:07:39 -07:00
smp.h Bluetooth: Fix LE Pairing time-out 2013-02-25 11:38:07 -08:00