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: <Zpeizmu-FOHCsPy0@hog>
Date: Wed, 17 Jul 2024 12:54:06 +0200
From: Sabrina Dubroca <sd@...asysnail.net>
To: Antonio Quartulli <antonio@...nvpn.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 23/25] ovpn: notify userspace when a peer is
 deleted

2024-06-27, 15:08:41 +0200, Antonio Quartulli wrote:
> diff --git a/drivers/net/ovpn/peer.c b/drivers/net/ovpn/peer.c
> index 2105bcc981fa..23418204fa8e 100644
> --- a/drivers/net/ovpn/peer.c
> +++ b/drivers/net/ovpn/peer.c
> @@ -273,6 +273,7 @@ void ovpn_peer_release_kref(struct kref *kref)
>  
>  	ovpn_peer_release(peer);
>  	netdev_put(peer->ovpn->dev, NULL);

I don't think you can access peer->ovpn once you release that
reference, if this peer was holding the last reference the netdev (and
the ovpn struct) could be gone while we're accessing it in
ovpn_nl_notify_del_peer.

> +	ovpn_nl_notify_del_peer(peer);
>  	kfree_rcu(peer, rcu);
>  }
>  
> diff --git a/drivers/net/ovpn/peer.h b/drivers/net/ovpn/peer.h
> index 8d24a8fdd03e..971603a70090 100644
> --- a/drivers/net/ovpn/peer.h
> +++ b/drivers/net/ovpn/peer.h
> @@ -129,6 +129,7 @@ static inline bool ovpn_peer_hold(struct ovpn_peer *peer)
>  
>  void ovpn_peer_release(struct ovpn_peer *peer);
>  void ovpn_peer_release_kref(struct kref *kref);
> +void ovpn_peer_release(struct ovpn_peer *peer);

nit: dupe of 2 lines before

-- 
Sabrina


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ