Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751753AbdFAPrJ (ORCPT ); Thu, 1 Jun 2017 11:47:09 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:33940 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbdFAPp0 (ORCPT ); Thu, 1 Jun 2017 11:45:26 -0400 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Eric Dumazet" , "David S. Miller" , "Andrey Konovalov" Date: Thu, 01 Jun 2017 16:43:16 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 210/212] sctp: do not inherit ipv6_{mc|ac|fl}_list from parent In-Reply-To: X-SA-Exim-Connect-IP: 82.70.136.246 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 980 Lines: 32 3.16.44-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Eric Dumazet commit fdcee2cbb8438702ea1b328fb6e0ac5e9a40c7f8 upstream. 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 Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/sctp/ipv6.c | 3 +++ 1 file changed, 3 insertions(+) --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c @@ -659,6 +659,9 @@ static struct sock *sctp_v6_create_accep newnp = inet6_sk(newsk); memcpy(newnp, np, sizeof(struct ipv6_pinfo)); + newnp->ipv6_mc_list = NULL; + newnp->ipv6_ac_list = NULL; + newnp->ipv6_fl_list = NULL; rcu_read_lock(); opt = rcu_dereference(np->opt);