projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96c2665
)
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
Marcel Holtmann
<marcel@holtmann.org>
Fri, 19 Dec 2014 12:48:27 +0000
(13:48 +0100)
same story as cmtp
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/bnep/core.c
patch
|
blob
|
blame
|
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);