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]
Message-ID: <7094b9cd-0ff0-0e5e-e3a6-efaa4a880062@kernel.org>
Date: Tue, 18 Jul 2023 08:45:21 -0600
From: David Ahern <dsahern@...nel.org>
To: Ido Schimmel <idosch@...sch.org>, Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, "David S . Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Thomas Haller <thaller@...hat.com>
Subject: Re: [PATCH net-next] ipv4/fib: send RTM_DELROUTE notify when flush
 fib

On 7/18/23 4:32 AM, Ido Schimmel wrote:
>>> @@ -2088,6 +2089,8 @@ int fib_table_flush(struct net *net, struct fib_table *tb, bool flush_all)
>>>  
>>>  			fib_notify_alias_delete(net, n->key, &n->leaf, fa,
>>>  						NULL);
>>> +			rtmsg_fib(RTM_DELROUTE, htonl(n->key), fa,
>>> +				  KEYLENGTH - fa->fa_slen, tb->tb_id, &info, 0);
>>
>> fib_table_flush() isn't only called when an address is deleted, but also
>> when an interface is deleted or put down. The lack of notification in
>> these cases is deliberate. Commit 7c6bb7d2faaf ("net/ipv6: Add knob to
>> skip DELROUTE message on device down") introduced a sysctl to make IPv6
>> behave like IPv4 in this regard, but this patch breaks it.
>>
>> IMO, the number of routes being flushed because a preferred source
>> address is deleted is significantly lower compared to interface down /
>> deletion, so generating notifications in this case is probably OK. It
>> also seems to be consistent with IPv6 given that rt6_remove_prefsrc()
>> calls fib6_clean_all() and not fib6_clean_all_skip_notify().
> 
> Actually, looking closer at IPv6, it seems that routes are not deleted,
> but instead the preferred source address is simply removed from them
> (w/o a notification).
> 
> Anyway, my point is that a RTM_DELROUTE notification should not be
> emitted for routes that are deleted because of interface down /
> deletion.
> 

exactly.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ