]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ipv6: fix possible crashes in ip6_cork_release()
authorEric Dumazet <edumazet@google.com>
Fri, 17 May 2013 04:53:13 +0000 (04:53 +0000)
committerWilly Tarreau <w@1wt.eu>
Mon, 19 May 2014 05:53:42 +0000 (07:53 +0200)
commit46e280b6b2d0b0849c902289579e756ead08a6d8
tree3a892b9f2745c0b4e7475866f4475489d826cb86
parent048c4543789eebb39d99648f48f39b6d96565103
ipv6: fix possible crashes in ip6_cork_release()

[ Upstream commit 284041ef21fdf2e0d216ab6b787bc9072b4eb58a ]

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 <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: Neal Cardwell <ncardwell@google.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/ipv6/ip6_output.c