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]
Date: Tue, 4 Jun 2024 08:48:47 +0200
From: Joel Granados <j.granados@...sung.com>
To: Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Eric
	Dumazet <edumazet@...gle.com>, "David S. Miller" <davem@...emloft.net>
CC: Luis Chamberlain <mcgrof@...nel.org>, Kees Cook <keescook@...omium.org>,
	<linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>,
	<linux-fsdevel@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: Re: [PATCH 3/8] sysctl: Remove check for sentinel element in
 ctl_table arrays

On Tue, Jun 04, 2024 at 08:29:21AM +0200, Joel Granados via B4 Relay wrote:
> From: Joel Granados <j.granados@...sung.com>
> --- a/net/sysctl_net.c
> +++ b/net/sysctl_net.c
> @@ -127,7 +127,7 @@ static void ensure_safe_net_sysctl(struct net *net, const char *path,
>  
>  	pr_debug("Registering net sysctl (net %p): %s\n", net, path);
>  	ent = table;
> -	for (size_t i = 0; i < table_size && ent->procname; ent++, i++) {
> +	for (size_t i = 0; i < table_size; ent++, i++) {
>  		unsigned long addr;
>  		const char *where;
>  
> @@ -165,17 +165,10 @@ struct ctl_table_header *register_net_sysctl_sz(struct net *net,
>  						struct ctl_table *table,
>  						size_t table_size)
>  {
> -	int count;
> -	struct ctl_table *entry;
> -
>  	if (!net_eq(net, &init_net))
>  		ensure_safe_net_sysctl(net, path, table, table_size);
>  
> -	entry = table;
> -	for (count = 0 ; count < table_size && entry->procname; entry++, count++)
> -		;
> -
> -	return __register_sysctl_table(&net->sysctls, path, table, count);
> +	return __register_sysctl_table(&net->sysctls, path, table, table_size);
>  }
>  EXPORT_SYMBOL_GPL(register_net_sysctl_sz);
>  

Given that this is a very small network related patch, I'm queueing this
in through the sysctl-next branch. Please let me know if you would
rather take it through the networking workflow.

Best

-- 

Joel Granados

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ