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:   Wed, 6 Nov 2019 16:56:57 +0100
From:   Hendrik Donner <hd@...cillation.de>
To:     David Ahern <dsahern@...il.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Cc:     Mark Tomlinson <mark.tomlinson@...iedtelesis.co.nz>
Subject: Re: [Possible regression?] ip route deletion behavior change

On 10/31/19 9:41 PM, David Ahern wrote:
> On 10/31/19 9:44 AM, Hendrik Donner wrote:
>> Hello,
>>
>> analyzing a network issue on our embedded system product i found a change in behavior 
>> regarding the removal of routing table entries when an IP address is removed.
>>
>> On older kernel releases before commit 5a56a0b3a45dd0cc5b2f7bec6afd053a474ed9f5
>> (simplified example):
>>
>> Routing table:
>>
>> # ip r
>> default via 10.0.2.2 dev enp0s3 proto dhcp src 10.0.2.15 metric 1024
>> 10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15
>> 10.0.2.2 dev enp0s3 proto dhcp scope link src 10.0.2.15 metric 1024
>> 10.20.0.0/14 via 10.0.2.2 dev enp0s3 src 10.20.40.100
>>
>> The last route was manually added with ip r add.
>>
>> Removing the IP 10.20.40.100 from enp0s3 also removes the last route:
>>
>> # ip r
>> default via 10.0.2.2 dev enp0s3 proto dhcp src 10.0.2.15 metric 1024
>> 10.0.2.0/24 dev enp0s3 proto kernel scope link src 10.0.2.15
>> 10.0.2.2 dev enp0s3 proto dhcp scope link src 10.0.2.15 metric 1024
>>
>> After the mentioned commit - so since v4.10 - the route will no longer be removed. At 
>> least for my team that's a surprising change in behavior because our system relies on
>> the old behavior.
>>
>> Reverting the commit restores the old behavior.
>>
>> I'm aware that our use case is a bit odd, but according to the commit message commit 
>> 5a56a0b3a45dd0cc5b2f7bec6afd053a474ed9f5 was meant to fix VRF related behavior while
>> having the described (maybe unintended?) user visible side effect for non-VRF usage.
>>
> 
> devices not associated with a VRF table are implicitly tied to the
> default == main table.
> 
> Can you test this change:
> 
> diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
> index 0913a090b2bf..f1888c683426 100644
> --- a/net/ipv4/fib_semantics.c
> +++ b/net/ipv4/fib_semantics.c
> @@ -1814,8 +1814,8 @@ int fib_sync_down_addr(struct net_device *dev,
> __be32 local)
>         int ret = 0;
>         unsigned int hash = fib_laddr_hashfn(local);
>         struct hlist_head *head = &fib_info_laddrhash[hash];
> +       int tb_id = l3mdev_fib_table(dev) ? : RT_TABLE_MAIN;
>         struct net *net = dev_net(dev);
> -       int tb_id = l3mdev_fib_table(dev);
>         struct fib_info *fi;
> 
>         if (!fib_info_laddrhash || local == 0)
> 
> [ As DaveM noted, you should cc maintainers and author(s) of suspected
> regression patches ]
> 

I've tested your patch and it restores the expected behavior.

+ Mark Tomlinson so he can have a look at it too.

And my mail server can't deliver to Shrijeet Mukherjee <shm@...ulusnetworks.com>.
Is that email address correct?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ