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]
Message-ID: <09cee612-2d94-4c8a-b388-123f498bf0bc@openvpn.net>
Date: Wed, 22 Jan 2025 10:00:58 +0100
From: Antonio Quartulli <antonio@...nvpn.net>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: netdev@...r.kernel.org, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Donald Hunter <donald.hunter@...il.com>, Shuah Khan <shuah@...nel.org>,
 ryazanov.s.a@...il.com, Andrew Lunn <andrew+netdev@...n.ch>,
 Simon Horman <horms@...nel.org>, linux-kernel@...r.kernel.org,
 linux-kselftest@...r.kernel.org, Xiao Liang <shaw.leon@...il.com>
Subject: Re: [PATCH net-next v18 20/25] ovpn: implement peer
 add/get/dump/delete via netlink

On 22/01/2025 09:51, Sabrina Dubroca wrote:
> 2025-01-22, 01:40:47 +0100, Antonio Quartulli wrote:
>> On 17/01/2025 12:48, Sabrina Dubroca wrote:
>> [...]
>>> With the delayed socket release (which is similar to what was in v11,
>>> but now with refcounting on the netdevice which should make
>>> rtnl_link_unregister in ovpn_cleanup wait [*]), we may return to
>>> userspace as if the peer was gone, but the socket hasn't been detached
>>> yet.
>>>
>>> A userspace application that tries to remove the peer and immediately
>>> re-create it with the same socket could get EBUSY if the workqueue
>>> hasn't done its job yet. That would be quite confusing to the
>>> application.
>>>
>>> So I would add a completion to wait here until the socket has been
>>> fully detached. Something like below.
>>>
>>> [*] I don't think the current refcounting fully protects against that,
>>> I'll comment on 05/25
>>
>> Sabrina, after the other changes I acknowledged, do you still have comments
>> for 5/25?
> 
> The call_rcu vs _put was all I had for this.
> 

Ok!

> Note that you have to wait until ~Feb 4th before you can resubmit
> (since net-next is currently closed). I'll take another look at this
> revision next week, since I've only checked a few specific things
> (mainly related to peer and socket destruction) so far.

Alright!
In the meantime I'll take these days to perform more tests (possibly 
extending the selftest suite a little bit).

If you want to compare this patchset with the very latest code 
(including your suggestions), you can check the main branch at:

https://github.com/openvpn/linux-kernel-ovpn

Thanks a lot!

Best Regards,


-- 
Antonio Quartulli
OpenVPN Inc.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ