[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <171400232813.3283422.11054250337629213107.b4-ty@chromium.org>
Date: Wed, 24 Apr 2024 16:45:31 -0700
From: Kees Cook <keescook@...omium.org>
To: Fei Li <fei1.li@...el.com>,
Justin Stitt <justinstitt@...gle.com>
Cc: Kees Cook <keescook@...omium.org>,
linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] virt: acrn: replace deprecated strncpy with strscpy
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
Powered by blists - more mailing lists