From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AH8x224I+Fpp0fAWbNnWb/ShfKW7VnSmRIvXRB1BbXtdo+5D5wo+JJjyuD8NXYPITxlKMYACQR3B ARC-Seal: i=1; a=rsa-sha256; t=1517256703; cv=none; d=google.com; s=arc-20160816; b=YZQqEROnaTChX3O6wyHXinXgKpaxb3TswaFhJdlw8Atno6abEb5jEr8K0O/cImEvXD lx1SFoh9jWCEQZYKpPoqdokXvTFfLSiJGuHGfonIpjymrO4iMYgp+FSFfzboNjo76T5I qFMaKyq3CmSoR5q9VJDyqIzmIYhQWIcHxlOhY2xJPSlsFEaepZp85nxGkhPgnGi7+53Z aBFMCMN8qJUcd7exk7aU/m/4kU2NDoOFAoR6cDt9lwyt8vEWLoE0a8goCv+sHcI46s+W BNxW8B6XS0tpgYI9DbcYUZSXhrHbdi5/U+2CtAjA7JhwoKsEtsLpQ4pFVUKdWFkbTAgM a6fg== 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=SMdmAboKIeVS4Clg+kBdhN+XWi4OIneB/OiopxjSKkw=; b=w29sWXPvoc+ZKcLFTdbcLCgbhA2ODpD6Pbm2a1Dy819VjcxcOrc+c+wL2iU0GGsB6M iKC2shgCUSvs70mDs7jLNJ1ynuFLw2Y4qY9zjbAN1WNCGbA5WMKBPqn70Ld2BSWCOy7K gl7dOigF8KXZrqoqszUkkUeUWOZk10rOjbv53LW8bKgln3kQHCTzbbvOR5QX3+/XOz8E 2hxPgTb9mqx8ci2ks7Kt6D+UfkQttq9Qt3Y1MwtudvrmuD57pW2YZ6WxIkU4GBRsxp7q tx5+fKrYbpsoutURlAwGPzE9P4H9I998dMR8AIXWT0SPJn+AM+ZdfJ7EDiLQbKYiaJ28 gU3g== 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.4 63/74] net: igmp: fix source address check for IGMPv3 reports Date: Mon, 29 Jan 2018 13:57:08 +0100 Message-Id: <20180129123850.383712554@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180129123847.507563674@linuxfoundation.org> References: <20180129123847.507563674@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?1590958965052055578?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.4-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 @@ -338,7 +338,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);