Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bluetooth: hidp: verify l2cap sockets
commit b3916db 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 <[email protected]> Acked-by: Marcel Holtmann <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Francisco Franco <[email protected]>
- Loading branch information