* [PATCH] net: igmp: fix source address check for IGMPv3 reports
@ 2018-01-19 10:50 Felix Fietkau
2018-01-22 21:17 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Felix Fietkau @ 2018-01-19 10:50 UTC (permalink / raw)
To: netdev; +Cc: cernekee, s.gottschall
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 <cernekee@chromium.org>
Fixes: a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports")
Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
net/ipv4/igmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 726f6b608274..2d49717a7421 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -332,7 +332,7 @@ static __be32 igmpv3_get_srcaddr(struct net_device *dev,
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);
--
2.14.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: igmp: fix source address check for IGMPv3 reports
2018-01-19 10:50 [PATCH] net: igmp: fix source address check for IGMPv3 reports Felix Fietkau
@ 2018-01-22 21:17 ` David Miller
2018-01-23 9:48 ` Felix Fietkau
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2018-01-22 21:17 UTC (permalink / raw)
To: nbd; +Cc: netdev, cernekee, s.gottschall
From: Felix Fietkau <nbd@nbd.name>
Date: Fri, 19 Jan 2018 11:50:46 +0100
> 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 <cernekee@chromium.org>
> Fixes: a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports")
> Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: igmp: fix source address check for IGMPv3 reports
2018-01-22 21:17 ` David Miller
@ 2018-01-23 9:48 ` Felix Fietkau
2018-01-23 16:18 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Felix Fietkau @ 2018-01-23 9:48 UTC (permalink / raw)
To: David Miller; +Cc: netdev, cernekee, s.gottschall
On 2018-01-22 22:17, David Miller wrote:
> From: Felix Fietkau <nbd@nbd.name>
> Date: Fri, 19 Jan 2018 11:50:46 +0100
>
>> 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 <cernekee@chromium.org>
>> Fixes: a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports")
>> Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>
> Applied, thanks.
Thanks. Please queue it up for stable as well, since the commit fixed by
this patch has already made it to stable kernels.
- Felix
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: igmp: fix source address check for IGMPv3 reports
2018-01-23 9:48 ` Felix Fietkau
@ 2018-01-23 16:18 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-01-23 16:18 UTC (permalink / raw)
To: nbd; +Cc: netdev, cernekee, s.gottschall
From: Felix Fietkau <nbd@nbd.name>
Date: Tue, 23 Jan 2018 10:48:59 +0100
> On 2018-01-22 22:17, David Miller wrote:
>> From: Felix Fietkau <nbd@nbd.name>
>> Date: Fri, 19 Jan 2018 11:50:46 +0100
>>
>>> 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 <cernekee@chromium.org>
>>> Fixes: a46182b00290 ("net: igmp: Use correct source address on IGMPv3 reports")
>>> Reported-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
>>> Signed-off-by: Felix Fietkau <nbd@nbd.name>
>>
>> Applied, thanks.
> Thanks. Please queue it up for stable as well, since the commit fixed by
> this patch has already made it to stable kernels.
I did, thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-23 16:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-19 10:50 [PATCH] net: igmp: fix source address check for IGMPv3 reports Felix Fietkau
2018-01-22 21:17 ` David Miller
2018-01-23 9:48 ` Felix Fietkau
2018-01-23 16:18 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).