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]
Date: Sat, 9 Dec 2023 11:36:31 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, pabeni@...hat.com, davem@...emloft.net,
	edumazet@...gle.com, jacob.e.keller@...el.com, jhs@...atatu.com,
	johannes@...solutions.net, andriy.shevchenko@...ux.intel.com,
	amritha.nambiar@...el.com, sdf@...gle.com, horms@...nel.org,
	przemyslaw.kitszel@...el.com
Subject: Re: [patch net-next v5 5/9] genetlink: introduce per-sock family
 private storage

Fri, Dec 08, 2023 at 05:11:23PM CET, kuba@...nel.org wrote:
>On Fri, 8 Dec 2023 15:21:52 +0100 Jiri Pirko wrote:
>> >> +static struct genl_sk_priv *genl_sk_priv_alloc(struct genl_family *family)
>> >> +{
>> >> +	struct genl_sk_priv *priv;
>> >> +
>> >> +	priv = kzalloc(size_add(sizeof(*priv), family->sock_priv_size),
>> >> +		       GFP_KERNEL);
>> >> +	if (!priv)
>> >> +		return ERR_PTR(-ENOMEM);
>> >> +	priv->destructor = family->sock_priv_destroy;  
>> >
>> >family->sock_priv_destroy may be in module memory.
>> >I think you need to wipe them when family goes :(  
>> 
>> Crap. That's a bit problematic. Family can unregister and register
>> again, with user having the same sock sill opened with legitimate
>> expectation of filter being applied. Don't see now how to handle this
>> other then no-destroy and just kfree here in genetlink.c :/ Going back
>> to v4?
>
>When family gets removed all subs must be cleared. So the user
>sock will have to resolve the mcast ID again, and re-subscribe
>again to get any notification. Having to re-sub implies having
>to re-add filters in my mind.

Okay, that sounds fine. Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ