lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 23 Feb 2018 13:58:20 -0700
From:   David Ahern <dsahern@...il.com>
To:     Stephen Suryaputra <ssuryaextr@...il.com>, netdev@...r.kernel.org
Subject: Re: VRF destination unreachable

On 2/23/18 10:49 AM, Stephen Suryaputra wrote:
> Greetings,
> 
> We found that ICMP destination unreachable isn't sent if VRF
> forwarding isn't configured, i.e.
> /proc/sys/net/ipv4/conf/<vrf_net_device>/forwarding isn't set. The
> relevant code is:
> 
> static int ip_error(struct sk_buff *skb)
> {
> ...
>         // in_dev is the vrf net_device
>         if (!IN_DEV_FORWARD(in_dev)) {
>                 switch (rt->dst.error) {
>                 case EHOSTUNREACH:
>                         __IP_INC_STATS(net, IPSTATS_MIB_INADDRERRORS);
>                         break;
> 
>                 case ENETUNREACH:
>                         __IP_INC_STATS(net, IPSTATS_MIB_INNOROUTES);
>                         break;
>                 }
>                 goto out;
>         }
> ...
> out:    kfree_skb(skb);
>         return 0;
> }
> 
> The question: is it intended to be set? The basic forwarding seems to
> be working without. We do set it on the slave net devices.

Unintended side effect of VRF as a netdev. This should fix it:

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 5ca7415cd48c..d59d005fb7c5 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -944,7 +944,7 @@ static int ip_error(struct sk_buff *skb)
                goto out;

        net = dev_net(rt->dst.dev);
-       if (!IN_DEV_FORWARD(in_dev)) {
+       if (!IN_DEV_FORWARD(in_dev) && !netif_is_l3_master(skb->dev)) {
                switch (rt->dst.error) {
                case EHOSTUNREACH:
                        __IP_INC_STATS(net, IPSTATS_MIB_INADDRERRORS);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ