]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv6: sctp: clone options to avoid use after free
authorEric Dumazet <edumazet@google.com>
Wed, 9 Dec 2015 15:25:06 +0000 (07:25 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 5 Feb 2016 03:33:25 +0000 (19:33 -0800)
commit488476113bddac87e2a3e555318dc76f4598a714
treeb9a5242ea7d5ed40d2ea709b0b1c7e56cf7ce524
parentb3c939a12ddebf0dd488d7cdc6e91d95564ca715
ipv6: sctp: clone options to avoid use after free

Orabug: 22623879

[ Upstream commit 9470e24f35ab81574da54e69df90c1eb4a96b43f ]

SCTP is lacking proper np->opt cloning at accept() time.

TCP and DCCP use ipv6_dup_options() helper, do the same
in SCTP.

We might later factorize this code in a common helper to avoid
future mistakes.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 683f40ec958e669b0d376a0d83c0213783ee7f99)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
net/sctp/ipv6.c