aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-05-17 10:16:40 -0400
committerDavid S. Miller <davem@davemloft.net>2017-05-18 10:24:08 -0400
commitfdcee2cbb8438702ea1b328fb6e0ac5e9a40c7f8 (patch)
tree36eeaff66310ffd838274809cdb6a628400732ca
parenta3f96c47c8d4c38be71fdbb440a99968c764ba62 (diff)
sctp: do not inherit ipv6_{mc|ac|fl}_list from parent
SCTP needs fixes similar to 83eaddab4378 ("ipv6/dccp: do not inherit ipv6_mc_list from parent"), otherwise bad things can happen. Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Andrey Konovalov <andreyknvl@google.com> Tested-by: Andrey Konovalov <andreyknvl@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sctp/ipv6.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 142b70e959af..f5b45b8b8b16 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -677,6 +677,9 @@ static struct sock *sctp_v6_create_accept_sk(struct sock *sk,
677 newnp = inet6_sk(newsk); 677 newnp = inet6_sk(newsk);
678 678
679 memcpy(newnp, np, sizeof(struct ipv6_pinfo)); 679 memcpy(newnp, np, sizeof(struct ipv6_pinfo));
680 newnp->ipv6_mc_list = NULL;
681 newnp->ipv6_ac_list = NULL;
682 newnp->ipv6_fl_list = NULL;
680 683
681 rcu_read_lock(); 684 rcu_read_lock();
682 opt = rcu_dereference(np->opt); 685 opt = rcu_dereference(np->opt);