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:
225734d
)
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
David S. Miller
<davem@davemloft.net>
Tue, 15 Dec 2015 20:39:08 +0000
(15:39 -0500)
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bluetooth/sco.c
patch
|
blob
|
blame
|
history
diff --git
a/net/bluetooth/sco.c
b/net/bluetooth/sco.c
index fe129663bd3f7faeb39f20d02a8425d525da071d..f52bcbf2e58cd8b8ded4c3d65c8dd9b87034b002 100644
(file)
--- a/
net/bluetooth/sco.c
+++ b/
net/bluetooth/sco.c
@@
-526,6
+526,9
@@
static int sco_sock_bind(struct socket *sock, struct sockaddr *addr,
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) {