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>] [day] [month] [year] [list]
Date:   Fri, 30 Sep 2022 11:36:11 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     cgel.zte@...il.com
Cc:     laurent@...ier.eu, arnd@...db.de, rppt@...nel.org,
        dmitry.osipenko@...labora.com, fthain@...ux-m68k.org,
        linux-kernel@...r.kernel.org, Xu Panda <xu.panda@....com.cn>,
        Zeal Robot <zealci@....com.cn>,
        linux-m68k <linux-m68k@...ts.linux-m68k.org>
Subject: Re: [PATCH linux-next] m68k: Move from strlcpy with unused retval to strscpy

CC linux-m68k

On Fri, Sep 30, 2022 at 10:07 AM <cgel.zte@...il.com> wrote:
> From: Xu Panda <xu.panda@....com.cn>
>
> The implementation of strscpy() is more robust and safer.
> That's now the recommended way to copy NUL terminated strings.
>
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Xu Panda <xu.panda@....com.cn>
> ---
>  arch/m68k/kernel/setup_mm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/m68k/kernel/setup_mm.c b/arch/m68k/kernel/setup_mm.c
> index 06ee394db610..401a8deb6ffc 100644
> --- a/arch/m68k/kernel/setup_mm.c
> +++ b/arch/m68k/kernel/setup_mm.c
> @@ -231,7 +231,7 @@ void __init setup_arch(char **cmdline_p)
>         setup_initial_init_mm((void *)PAGE_OFFSET, _etext, _edata, _end);
>
>  #if defined(CONFIG_BOOTPARAM)
> -       strncpy(m68k_command_line, CONFIG_BOOTPARAM_STRING, CL_SIZE);
> +       strscpy(m68k_command_line, CONFIG_BOOTPARAM_STRING, CL_SIZE);
>         m68k_command_line[CL_SIZE - 1] = 0;
>  #endif /* CONFIG_BOOTPARAM */
>         process_uboot_commandline(&m68k_command_line[0], CL_SIZE);
> --
> 2.15.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ