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:
014be2c
)
ipv6: fix possible crashes in ip6_cork_release()
author
Eric Dumazet
<
[email protected]
>
Fri, 17 May 2013 04:53:13 +0000
(
04:53
+0000)
committer
David S. Miller
<
[email protected]
>
Sat, 18 May 2013 19:55:45 +0000
(12:55 -0700)
commit
0178b695fd6b4
("ipv6: Copy cork options in ip6_append_data")
added some code duplication and bad error recovery, leading to potential
crash in ip6_cork_release() as kfree() could be called with garbage.
use kzalloc() to make sure this wont happen.
Signed-off-by: Eric Dumazet <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
Cc: Herbert Xu <
[email protected]
>
Cc: Hideaki YOSHIFUJI <
[email protected]
>
Cc: Neal Cardwell <
[email protected]
>
net/ipv6/ip6_output.c
patch
|
blob
|
history
diff --git
a/net/ipv6/ip6_output.c
b/net/ipv6/ip6_output.c
index d2eedf192330caf5a963c27ddaceffae5e4886b8..dae1949019d7b8dc77d14c39478571e86ad89f34 100644
(file)
--- a/
net/ipv6/ip6_output.c
+++ b/
net/ipv6/ip6_output.c
@@
-1147,7
+1147,7
@@
int ip6_append_data(struct sock *sk, int getfrag(void *from, char *to,
if (WARN_ON(np->cork.opt))
return -EINVAL;
- np->cork.opt = k
m
alloc(opt->tot_len, sk->sk_allocation);
+ np->cork.opt = k
z
alloc(opt->tot_len, sk->sk_allocation);
if (unlikely(np->cork.opt == NULL))
return -ENOBUFS;