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: <202504181322.5D3B93E93@keescook>
Date: Fri, 18 Apr 2025 13:23:24 -0700
From: Kees Cook <kees@...nel.org>
To: Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Richard Henderson <richard.henderson@...aro.org>,
	Matt Turner <mattst88@...il.com>,
	"Paul E. McKenney" <paulmck@...nel.org>,
	Al Viro <viro@...iv.linux.org.uk>, Arnd Bergmann <arnd@...db.de>,
	linux-hardening@...r.kernel.org, linux-alpha@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] smp: Replace deprecated strcpy() with strscpy()

On Thu, Apr 17, 2025 at 09:20:52PM +0200, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.

Are there more strcpy() uses in arch/alpha? Maybe do all of them and
give the Subject prefix as "alpha:". If not, the "smp:" prefix is likely
to non-specific. Maybe "alpha: smp:".

-Kees

> 
> Link: https://github.com/KSPP/linux/issues/88
> Cc: linux-hardening@...r.kernel.org
> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> ---
>  arch/alpha/kernel/smp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
> index ed06367ece57..56155b988b9c 100644
> --- a/arch/alpha/kernel/smp.c
> +++ b/arch/alpha/kernel/smp.c
> @@ -262,7 +262,7 @@ recv_secondary_console_msg(void)
>  
>  		cnt = cpu->ipc_buffer[0] >> 32;
>  		if (cnt <= 0 || cnt >= 80)
> -			strcpy(buf, "<<< BOGUS MSG >>>");
> +			strscpy(buf, "<<< BOGUS MSG >>>");
>  		else {
>  			cp1 = (char *) &cpu->ipc_buffer[1];
>  			cp2 = buf;
> -- 
> 2.49.0
> 
> 

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ