projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ef5e75
)
can: raw: raw_bind(): bail out if can_family is not AF_CAN
author
Marc Kleine-Budde
<mkl@pengutronix.de>
Sun, 30 Jul 2017 21:51:01 +0000
(23:51 +0200)
committer
Marc Kleine-Budde
<mkl@pengutronix.de>
Fri, 5 Jan 2018 10:12:08 +0000
(11:12 +0100)
Until now CAN raw's bind() doesn't check if the can_familiy in the
struct sockaddr_can is set to AF_CAN. This patch adds the missing check.
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
net/can/raw.c
patch
|
blob
|
history
diff --git
a/net/can/raw.c
b/net/can/raw.c
index 864c80dbdb72d11cdd24183cec3769222b339ccc..f2ecc43376a15993463401770d3ef41ca4cc3a33 100644
(file)
--- a/
net/can/raw.c
+++ b/
net/can/raw.c
@@
-401,6
+401,8
@@
static int raw_bind(struct socket *sock, struct sockaddr *uaddr, int len)
if (len < sizeof(*addr))
return -EINVAL;
+ if (addr->can_family != AF_CAN)
+ return -EINVAL;
lock_sock(sk);