Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f6237750 authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman
Browse files

Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket



commit 71bb99a02b32b4cc4265118e85f6035ca72923f0 upstream.

same story as cmtp

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 354ff804
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -533,6 +533,9 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)

	BT_DBG("");

	if (!l2cap_is_socket(sock))
		return -EBADFD;

	baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
	baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);