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: <9b49004d-709a-4ce0-86f6-99ba1e782533@openvpn.net>
Date: Thu, 18 Jul 2024 12:16:10 +0200
From: Antonio Quartulli <antonio@...nvpn.net>
To: Sabrina Dubroca <sd@...asysnail.net>
Cc: netdev@...r.kernel.org, kuba@...nel.org, ryazanov.s.a@...il.com,
 pabeni@...hat.com, edumazet@...gle.com, andrew@...n.ch
Subject: Re: [PATCH net-next v5 10/25] ovpn: implement basic TX path (UDP)

On 18/07/2024 12:07, Sabrina Dubroca wrote:
> 2024-06-27, 15:08:28 +0200, Antonio Quartulli wrote:
>> +static bool ovpn_encrypt_one(struct ovpn_peer *peer, struct sk_buff *skb)
>> +{
>> +	ovpn_skb_cb(skb)->peer = peer;
>> +
>> +	/* take a reference to the peer because the crypto code may run async.
>> +	 * ovpn_encrypt_post() will release it upon completion
>> +	 */
>> +	DEBUG_NET_WARN_ON_ONCE(!ovpn_peer_hold(peer));
> 
> Shouldn't we abort if this fails? This should not really happen, but
> if it did, we would proceed (possibly with async crypto) without a ref
> on the peer.

Yap, better bail out.


> 
>> +	ovpn_encrypt_post(skb, 0);
>> +	return true;
>> +}
>> +
> 
> [...]
>> diff --git a/drivers/net/ovpn/io.h b/drivers/net/ovpn/io.h
>> index aa259be66441..95568671d5ae 100644
>> --- a/drivers/net/ovpn/io.h
>> +++ b/drivers/net/ovpn/io.h
>> @@ -12,4 +12,6 @@
>>   
>>   netdev_tx_t ovpn_net_xmit(struct sk_buff *skb, struct net_device *dev);
>>   
>> +void ovpn_encrypt_work(struct work_struct *work);
> 
> leftover from the old implementation I think?

ops, you're right.

Thanks

> 

-- 
Antonio Quartulli
OpenVPN Inc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ