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: <b8612694-c5b7-4b62-8b9d-783aaec1439f@openvpn.net>
Date: Tue, 19 Nov 2024 14:44:51 +0100
From: Antonio Quartulli <antonio@...nvpn.net>
To: Sergey Ryazanov <ryazanov.s.a@...il.com>
Cc: 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>, sd@...asysnail.net,
 Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next v11 07/23] ovpn: introduce the ovpn_socket object

On 15/11/2024 15:28, Antonio Quartulli wrote:
[...]
>>> +}
>>> +
>>> +static struct ovpn_socket *ovpn_socket_get(struct socket *sock)
>>> +{
>>> +    struct ovpn_socket *ovpn_sock;
>>> +
>>> +    rcu_read_lock();
>>> +    ovpn_sock = rcu_dereference_sk_user_data(sock->sk);
>>> +    if (!ovpn_socket_hold(ovpn_sock)) {
>>> +        pr_warn("%s: found ovpn_socket with ref = 0\n", __func__);
>>
>> Should we be more specific here and print warning with 
>> netdev_warn(ovpn_sock->ovpn->dev, ...)?
> 
> ACK must be an unnoticed leftover

I take this back.
If refcounter is zero, I'd avoid accessing any field of the ovpn_sock 
object, thus the pr_warn() without any reference to the device.

Regards,

-- 
Antonio Quartulli
OpenVPN Inc.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ