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]
Message-ID: <YmcJ7V0ywWcwvS/6@bombadil.infradead.org>
Date:   Mon, 25 Apr 2022 13:51:57 -0700
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Vasily Averin <vvs@...nvz.org>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Kees Cook <keescook@...omium.org>,
        Iurii Zaikin <yzaikin@...gle.com>, kernel@...nvz.org
Subject: Re: [PATCH] sysctl: minor cleanup in new_dir()

On Sun, Apr 24, 2022 at 09:28:54PM +0300, Vasily Averin wrote:
> Byte zeroing is not required here, since memory was allocated by kzalloc()
> 
> Signed-off-by: Vasily Averin <vvs@...nvz.org>
> ---
>  fs/proc/proc_sysctl.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
> index 7d9cfc730bd4..094c24e010ae 100644
> --- a/fs/proc/proc_sysctl.c
> +++ b/fs/proc/proc_sysctl.c
> @@ -978,7 +978,6 @@ static struct ctl_dir *new_dir(struct ctl_table_set *set,
>  	table = (struct ctl_table *)(node + 1);
>  	new_name = (char *)(table + 2);
>  	memcpy(new_name, name, namelen);
> -	new_name[namelen] = '\0';
>  	table[0].procname = new_name;
>  	table[0].mode = S_IFDIR|S_IRUGO|S_IXUGO;
>  	init_header(&new->header, set->dir.header.root, set, node, table);

Queued onto sysctl-testing, thanks!

  Luis

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ