projects
/
platform
/
kernel
/
linux-exynos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
262ee97
)
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
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 23 Jan 2016 04:54:15 +0000
(20:54 -0800)
[ Upstream commit
5233252fce714053f0151680933571a2da9cbfb4
]
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/sco.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/sco.c
b/net/bluetooth/sco.c
index
4322c83
..
8611bc7
100644
(file)
--- a/
net/bluetooth/sco.c
+++ b/
net/bluetooth/sco.c
@@
-520,6
+520,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) {