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] [day] [month] [year] [list]
Date:   Sun, 15 Oct 2017 19:56:34 -0600
From:   David Ahern <dsahern@...il.com>
To:     Alexander Aring <aring@...atatu.com>, netdev@...r.kernel.org
Cc:     Jamal Hadi Salim <jhs@...atatu.com>
Subject: Re: routing UAPI mismatch invalid state behavior?

On 10/15/17 11:02 AM, Alexander Aring wrote:
> Hi,
> 
> I figure out some problem, easy to reproduce:
> 
> # setup dummy
> $ modprobe dummy
> $ ip link set dummy0 up
> 
> # issue
> $ ip route replace default via 169.254.65.37 dev dummy0
> RTNETLINK answers: Network is unreachable

This fails in fib_check_nh. Basically the lookup of the address fails
making it an invalid gateway.

> 
> so it will forbid me to do that, but:
> 
> $ ip route replace 169.254.65.37 dev dummy0

This succeeds because iproute2 adds NLM_F_CREATE to flags along with
REPLACE:

        if (matches(*argv, "replace") == 0)
                return iproute_modify(RTM_NEWROUTE,
NLM_F_CREATE|NLM_F_REPLACE,
                                      argc-1, argv+1);

but your overall intent here of resolving 169.254.65.37 is the key.

> $ ip route replace default via 169.254.65.37 dev dummy0

The existence of the previous route allows the gateway check in
fib_check_nh to succeed.

> $ ip route del 169.254.65.37 dev dummy0
> 
> allows me to do that. Is there now a invalid state in my routing table
> or is it an expected behavior?

There are no recursive checks to gateway lookups once the routes are
installed. With the way routes and nexthops are currently created doing
so would be very expensive in some setups.

Powered by blists - more mailing lists