Re: [PATCH] virt: acrn: replace deprecated strncpy with strscpy

From: Kees Cook
Date: Wed Apr 24 2024 - 19:45:47 EST


On Wed, 20 Mar 2024 23:27:09 +0000, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous string
> interfaces.
>
> We can see that client->name should be NUL-terminated based on its usage
> with a %s C-string format specifier.
> | client->thread = kthread_run(ioreq_task, client, "VM%u-%s",
> | client->vm->vmid, client->name);
>
> [...]

Applied to for-next/hardening, thanks!

[1/1] virt: acrn: replace deprecated strncpy with strscpy
https://git.kernel.org/kees/c/e8a87d0cd048

Take care,

--
Kees Cook