projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b79a794
)
can: Fix raw_getname() leak
author
Eric Dumazet
<
[email protected]
>
Thu, 6 Aug 2009 20:27:04 +0000
(20:27 +0000)
committer
David S. Miller
<
[email protected]
>
Mon, 10 Aug 2009 04:45:32 +0000
(21:45 -0700)
raw_getname() can leak 10 bytes of kernel memory to user
(two bytes hole between can_family and can_ifindex,
8 bytes at the end of sockaddr_can structure)
Signed-off-by: Eric Dumazet <
[email protected]
>
Acked-by: Oliver Hartkopp <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/can/raw.c
patch
|
blob
|
history
diff --git
a/net/can/raw.c
b/net/can/raw.c
index f4cc44548bdaa35a2b6947b8c7ef89affe8ac615..db3152df7d2b627fd2484c14734e9a084d3e93a0 100644
(file)
--- a/
net/can/raw.c
+++ b/
net/can/raw.c
@@
-401,6
+401,7
@@
static int raw_getname(struct socket *sock, struct sockaddr *uaddr,
if (peer)
return -EOPNOTSUPP;
+ memset(addr, 0, sizeof(*addr));
addr->can_family = AF_CAN;
addr->can_ifindex = ro->ifindex;