projects
/
wrapfs-2.6.32.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
073a63f
)
bluetooth: Validate socket address length in sco_sock_bind().
author
David S. Miller
<davem@davemloft.net>
Tue, 15 Dec 2015 20:39:08 +0000
(15:39 -0500)
committer
Willy Tarreau
<w@1wt.eu>
Fri, 29 Jan 2016 21:12:43 +0000
(22:12 +0100)
commit
5233252fce714053f0151680933571a2da9cbfb4
upstream.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/bluetooth/sco.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/sco.c
b/net/bluetooth/sco.c
index e52443ce4f9c2cc9a1fe3f60eef59be98b9eb2ea..735b5fb8e2044bd5e0c4eff79725ea6df3ac1246 100644
(file)
--- a/
net/bluetooth/sco.c
+++ b/
net/bluetooth/sco.c
@@
-463,6
+463,9
@@
static int sco_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_le
if (!addr || addr->sa_family != AF_BLUETOOTH)
return -EINVAL;
+ if (addr_len < sizeof(struct sockaddr_sco))
+ return -EINVAL;
+
lock_sock(sk);
if (sk->sk_state != BT_OPEN) {