Received: by 10.223.185.116 with SMTP id b49csp6418648wrg; Wed, 28 Feb 2018 09:05:11 -0800 (PST) X-Google-Smtp-Source: AG47ELsG/FbbsTwW7vDD7hkuisV36HGu9E1owOiYwip3Vifqndr24RApVdLLOM2wLNye/BFGdnS/ X-Received: by 2002:a17:902:b117:: with SMTP id q23-v6mr15054539plr.58.1519837511377; Wed, 28 Feb 2018 09:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519837511; cv=none; d=google.com; s=arc-20160816; b=W+QE4C3j4sh7b7iTYRlMFMHDNcwA2eUraDJcvQ61O2mLxARHBch/WR5GV8A12spa17 zGsrkAaSXW36OXPZdzl40NbW8Za+dKgGL/1zKTagotvZvbWD4+uF4lzJeI7pyyrTb3sl T7mpTvL6cgDjm17ffZPMRqy7dFBZ0g8J3NGRyJii2d5P5eODHpNef1I0NFNjHA8GCCUw L5iP1gZdZNM42l0Ohz1vedyecXXqviRX/7mSi5+Ag7E5sO6qIvH6kAt2Y/WuQXgnllCW M43TyUpvLNMi8OCr4wT+HYBTGFeVvlnhzWpVaoR4pg8wpZYMUb15lDvA1pTRpI4PsLVV VKPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=PWTuOekSGyWEdGvpy4hM18/wNkwWFEZXxkaluuCXxxg=; b=v1ji/ZKqocJt7k/I7bJQX1HUyWPXCG1oQgFIesdK6xvnQxNV1ih682iqNGlQCe3/Uj Q8gCmn/CMv/pxpmJZiDGjSirl7u4OanEm3ErsswIaGjSEgMjScr45kFlzjVikmjKQ3Nj 0EAOSk+un517thf1CiW2TavondFaL4l09ZRhiQDo0r3wKZ2i5ddci9n4WWA2nOTyUI1U EyHrAdwO8UCZ/r/mtsDMXuIZcQ/gab/yxaF+qIUneo2d0OyMr76AMnROGaQXkmhsTgoN 705waI9dhhdxdhhiWLyllTGAvrrA7oWjybqEN9oZkqFcdArMvOf23FrBPm9+8ym1euF2 IhqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m16-v6si1559008pls.471.2018.02.28.09.04.46; Wed, 28 Feb 2018 09:05:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933764AbeB1Pvw (ORCPT + 99 others); Wed, 28 Feb 2018 10:51:52 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:34353 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933733AbeB1Pvs (ORCPT ); Wed, 28 Feb 2018 10:51:48 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1er3Yo-0006Xb-AT; Wed, 28 Feb 2018 15:22:26 +0000 Received: from ben by deadeye with local (Exim 4.90_1) (envelope-from ) id 1er3Yk-0000Hx-EE; Wed, 28 Feb 2018 15:22:22 +0000 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, "David S. Miller" , "Kevin Cernekee" , "Sebastian Gottschall" , "Felix Fietkau" Date: Wed, 28 Feb 2018 15:20:18 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 224/254] net: igmp: fix source address check for IGMPv3 reports In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.55-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Felix Fietkau commit ad23b750933ea7bf962678972a286c78a8fa36aa upstream. Commit "net: igmp: Use correct source address on IGMPv3 reports" introduced a check to validate the source address of locally generated IGMPv3 packets. Instead of checking the local interface address directly, it uses inet_ifa_match(fl4->saddr, ifa), which checks if the address is on the local subnet (or equal to the point-to-point address if used). This breaks for point-to-point interfaces, so check against ifa->ifa_local directly. Cc: Kevin Cernekee Fixes: a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports") Reported-by: Sebastian Gottschall Signed-off-by: Felix Fietkau Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/ipv4/igmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -334,7 +334,7 @@ static __be32 igmpv3_get_srcaddr(struct return htonl(INADDR_ANY); for_ifa(in_dev) { - if (inet_ifa_match(fl4->saddr, ifa)) + if (fl4->saddr == ifa->ifa_local) return fl4->saddr; } endfor_ifa(in_dev);