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: <ZpT8mQsZiPBxnaf_@hog>
Date: Mon, 15 Jul 2024 12:40:25 +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 15/25] ovpn: implement multi-peer support

2024-06-27, 15:08:33 +0200, Antonio Quartulli wrote:
> @@ -46,6 +46,17 @@ static int ovpn_struct_init(struct net_device *dev, enum ovpn_mode mode)
>  	ovpn->mode = mode;
>  	spin_lock_init(&ovpn->lock);
>  
> +	if (mode == OVPN_MODE_MP) {
> +		/* the peer container is fairly large, therefore we dynamically
> +		 * allocate it only when needed
> +		 */
> +		ovpn->peers = kzalloc(sizeof(*ovpn->peers), GFP_KERNEL);
> +		if (!ovpn->peers)
> +			return -ENOMEM;

As we discussed in v3 (it was about the workqueue), I don't think this
will get freed correctly in some of the failure cases. This should go
in ovpn_net_init.

> +
> +		spin_lock_init(&ovpn->peers->lock);
> +	}
> +
>  	return 0;
>  }

-- 
Sabrina


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ