From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x2243VJ9rjfvDOQ0KSBYrpRCz4eLijLaYkrAWcyu+lOB8LmsqrvEMsZQBkKLtPzud+EzipIOo ARC-Seal: i=1; a=rsa-sha256; t=1517257027; cv=none; d=google.com; s=arc-20160816; b=PucTUfMPXAqMnZyIYgQq2n3RZVbJxVeKthMFtVf3R2d+T/7Us3fOq/hz4bpAM2a/Be ialJsheoaJk49c3oIid/O9vEaTJX06nR+1N6udAF/FNsa+f6rDQ362PPVyRLzyHU8KyJ pghjOp7sGLgmfQd54UE7Y6F1cvWYaFFp46qpe9Fd8BEG89xyuEp0ELG5nrFu8j0JBcG0 GDjE295e7IpqwQKuUuG6vfBDxz2sKZf5Y8cXbryr80hWU+AOvJbPuCAX1WFMx14hxxsG AuysPQWOLD0yWrvL76QMAdEDWuJ/Gu9EvTxprMIIkWLbQlxAVobUyWsrw2Qbpz0aMQJH DEtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=aqmDOcgmNPQQU1rVI3zFVmMyPTU6ymPObok6zXYN6MQ=; b=MdN+8nyXXL8Shg9u1lU1Nc/I02znop+HhrdeMx4i5VDawjr0FIRT6CexHizsnksuxf RYh8X5U5VhOp4745m0TZWpfG2bjNoTI8Gwa2G5Ctu3YJ9enfKnOP172pLnHCA8IQzli8 5v5d5CEZ9FRtDrGKz2sm+LEFKKMXEYUxAMyeLoXAC/N+0TmBRg1IpfT/zatHEDHdaHNL ZKIIn/nCXHX2YCJx50Vza4uWDTfcYYZ9TJGtL2AYlUM/lFw7JkrjB4EPFdXpLw2UOdil OUAVU1N3tqcdMxQGS75fMw/dzNMXKjjWSvvb6W0Dvn4PV+kqdkzaN7j4MU2svMpJx0pG aC9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 90.92.71.90 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kevin Cernekee , Sebastian Gottschall , Felix Fietkau , "David S. Miller" Subject: [PATCH 4.14 30/71] net: igmp: fix source address check for IGMPv3 reports Date: Mon, 29 Jan 2018 13:56:58 +0100 Message-Id: <20180129123829.254396569@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129123827.271171825@linuxfoundation.org> References: <20180129123827.271171825@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1590958493573915596?= X-GMAIL-MSGID: =?utf-8?q?1590959304633507201?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Felix Fietkau [ Upstream commit ad23b750933ea7bf962678972a286c78a8fa36aa ] 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: Greg Kroah-Hartman --- net/ipv4/igmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -332,7 +332,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);