From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x227Zkr3oWmH8GdpvDlDN6ZT8ffL6zlkR1b4fDG0t70LnWi1urd4r2ukWVXlzPGTCYrYRb9uS ARC-Seal: i=1; a=rsa-sha256; t=1517256579; cv=none; d=google.com; s=arc-20160816; b=Yv9GHcFeRKG3A6l2ByCLH0a7myAUlIbDnFHKdE97LX2/6bYwyxNY5jDGMBTId6S1Up CXOuTIoOApGJCY7aBtsHfFqJWjDq3skDCIPkwx4xP57A2LMnJ6PxE6fl9gx4iWUETMm1 U1fZYxIcUOqD6437BHAl6oB2P6dqfK/sVu1M5ou9BKHEv/9nEW1LPsC/k5Gc5CmDBxVV tfAfEEgadQ8ts+jt2bSMWD+3vC1nPzWQ1bRKB0dy3XU5ANoHF/LVq21o52UNnG0YKxOJ GTjutFBvDet4JOyP6qrdFUVYprgiQ1+FLCgFISJltUkzM3hQmHhzFpk9D8mnqIN1rlD2 70+A== 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=jBNd+pJykJtx/q83ER8QBd9DV1nQM1A2awp5LdVaE3U=; b=m19NcZqR6gQIDkdAKEarkxH3j8Bnv4W5qDypL74Yg+PuR0/X8FIRdj7bw0tfMHar1R nwo1oaqV7CaHwi14SJnsuIt3O+BMlx0ypxz1sd7Xp0ELQMukVvvUy3gt/GDuT7uJC6CD OW41euLHIwSntMl7hqU49VecXb0m4v4/9lf5f8gU3SP7aUaX5VPuckUp6ls7Xd8IHfEa /Vw1b1IAfJfED31b+j/LZo0BZSTsn99uG6+tvUtXwOkILaXOaR3FPa4341doFSoeucQD OUeuaSdNnLcjajWu0mUOoFu3HHQ0c+AJCGxpk2qIyI87IyMSXSYSlAieQecA+NO3K0Ye t1lg== 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.9 38/66] net: igmp: fix source address check for IGMPv3 reports Date: Mon, 29 Jan 2018 13:57:02 +0100 Message-Id: <20180129123841.896058776@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129123839.842860149@linuxfoundation.org> References: <20180129123839.842860149@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?1590958835084723250?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.9-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);