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: <1fdb09f3-c228-45eb-99f8-fdbc8b4f9dcf@linux-m68k.org>
Date: Wed, 19 Feb 2025 08:45:37 +1000
From: Greg Ungerer <gerg@...ux-m68k.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>,
 Thorsten Blum <thorsten.blum@...ux.dev>
Cc: Jean-Michel Hautbois <jeanmichel.hautbois@...eli.org>,
 linux-hardening@...r.kernel.org, linux-m68k@...ts.linux-m68k.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] m68k: mm: Replace deprecated strncpy() with strscpy()

Hi Thorsten,

On 19/2/25 00:13, Geert Uytterhoeven wrote:
> On Thu, 13 Feb 2025 at 15:11, Thorsten Blum <thorsten.blum@...ux.dev> wrote:
>> strncpy() is deprecated for NUL-terminated destination buffers. Use
>> strscpy() instead and remove the manual NUL-termination.
>>
>> Compile-tested only.
>>
>> Link: https://github.com/KSPP/linux/issues/90
>> Cc: linux-hardening@...r.kernel.org
>> Signed-off-by: Thorsten Blum <thorsten.blum@...ux.dev>
> 
> Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
> 
>> --- a/arch/m68k/kernel/setup_mm.c
>> +++ b/arch/m68k/kernel/setup_mm.c
>> @@ -243,8 +243,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);
>> -       m68k_command_line[CL_SIZE - 1] = 0;
>> +       strscpy(m68k_command_line, CONFIG_BOOTPARAM_STRING, CL_SIZE);
>>   #endif /* CONFIG_BOOTPARAM */
>>          process_uboot_commandline(&m68k_command_line[0], CL_SIZE);
>>          *cmdline_p = m68k_command_line;
> 
> This seems to be used mostly by Coldfire, so I'll let Greg handle it.

Looks good. Pushed into the m68knommu git tree, for-next branch, with
JM's tested-by and Geert's reviewed-by added.

Thanks
Greg


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ