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: <mv6ck735oa4ix7emkjtgt3cwrbhyizina4tady26nzx6otbvi2@ngewjjf6ahdf>
Date: Fri, 12 Sep 2025 11:05:28 -0700
From: Justin Stitt <justinstitt@...gle.com>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Alexander Viro <viro@...iv.linux.org.uk>, 
	Christian Brauner <brauner@...nel.org>, Jan Kara <jack@...e.cz>, linux-hardening@...r.kernel.org, 
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] initramfs: Replace strcpy() with strscpy() in find_link()

Hi,

On Fri, Sep 12, 2025 at 08:47:24AM +0200, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.
> 
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>

Reviewed-by: Justin Stitt <justinstitt@...gle.com>

> ---
>  init/initramfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/init/initramfs.c b/init/initramfs.c
> index 097673b97784..6745e3fbc7ab 100644
> --- a/init/initramfs.c
> +++ b/init/initramfs.c
> @@ -108,7 +108,7 @@ static char __init *find_link(int major, int minor, int ino,
>  	q->minor = minor;
>  	q->ino = ino;
>  	q->mode = mode;
> -	strcpy(q->name, name);
> +	strscpy(q->name, name);
>  	q->next = NULL;
>  	*p = q;
>  	hardlink_seen = true;
> -- 
> 2.51.0
> 
>

Thanks
Justin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ