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: <CAEpZnwVW2x7oor+=9uRiJXyC_fHgZPet5eA0w4O-shc6Aimt2A@mail.gmail.com>
Date: Tue, 22 Apr 2025 21:30:56 +0330
From: mohammad mahdi anbaraki <m.mahdianbaraki@...il.com>
To: geert@...ux-m68k.org
Cc: linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] m68k/kernel: replace strncpy() with strscpy()

Hi
.Just a gentle follow-up on this patch
/s/m64k/m68k

‫‪Mohammad Mahdi Anbaraki‬‏ <‪m.mahdianbaraki@...il.com‬‏> در تاریخ
پنجشنبه ۳ آوریل ۲۰۲۵ ساعت ۲۱:۴۲ نوشت:‬
>
> Swapped out strncpy() for strscpy() in parse_uboot_commandline() while
> copying to commandp. strscpy() makes sure the string is properly null-
> terminated and gives a more useful return value so it's just a safer
> choice overall.
>
> Link: https://github.com/KSPP/linux/issues/90
> Signed-off-by: Mohammad Mahdi Anbaraki <m.mahdianbaraki@...il.com>
> ---
> Changes in v2:
> - s/m64/m68
>
>  arch/m68k/kernel/uboot.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c
> index 5e52ea150..fa7c279ea 100644
> --- a/arch/m68k/kernel/uboot.c
> +++ b/arch/m68k/kernel/uboot.c
> @@ -73,7 +73,7 @@ static void __init parse_uboot_commandline(char *commandp, int size)
>         uboot_cmd_end = sp[5];
>
>         if (uboot_cmd_start && uboot_cmd_end)
> -               strncpy(commandp, (const char *)uboot_cmd_start, size);
> +               strscpy(commandp, (const char *)uboot_cmd_start, size);
>
>  #if defined(CONFIG_BLK_DEV_INITRD)
>         uboot_initrd_start = sp[2];
> --
> 2.43.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ