]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6:introduce function to find route for redirect
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Wed, 4 Sep 2013 11:44:21 +0000 (19:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2013 16:44:31 +0000 (12:44 -0400)
commit8fe6360f32a0b97599884cf5bd98dea704d84f78
tree653c9c8e67466faf48321d35ced7c9dc95f651fd
parent4ce488a289917cffd0ae9d4b268d20b16ba84611
ipv6:introduce function to find route for redirect

RFC 4861 says that the IP source address of the Redirect is the
same as the current first-hop router for the specified ICMP
Destination Address, so the gateway should be taken into
consideration when we find the route for redirect.

There was once a check in commit
6d59b362fd5b47fa469cf85ccc955b2d230580c0 ("NDISC: Search over
all possible rules on receipt of redirect.") and the check
went away in commit 07eef778adc9e26f4adcecdabf3f3efb542ebb4d
("ipv6: Use icmpv6_notify() to propagate redirect, instead of
rt6_redirect()").

The bug is only "exploitable" on layer-2 because the source
address of the redirect is checked to be a valid link-local
address but it makes spoofing a lot easier in the same L2
domain nonetheless.

Thanks very much for Hannes's help.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ah6.c
net/ipv6/esp6.c
net/ipv6/icmp.c
net/ipv6/ipcomp6.c
net/ipv6/ndisc.c
net/ipv6/route.c