projects
/
wrapfs-5.3.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
354ff80
)
Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap...
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 19 Dec 2014 06:20:59 +0000
(06:20 +0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 16:30:09 +0000
(09:30 -0700)
commit
71bb99a02b32b4cc4265118e85f6035ca72923f0
upstream.
same story as cmtp
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/bnep/core.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/bnep/core.c
b/net/bluetooth/bnep/core.c
index 85bcc21e84d2006c4839b2b7f409f2595cb41858..ce82722d049b7c013fd06f66f726fbbf75a01f56 100644
(file)
--- a/
net/bluetooth/bnep/core.c
+++ b/
net/bluetooth/bnep/core.c
@@
-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);