[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <169818232968.2100071.6650937049148310025.b4-ty@chromium.org>
Date: Tue, 24 Oct 2023 14:18:49 -0700
From: Kees Cook <keescook@...omium.org>
To: Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...nel.org>, dm-devel@...hat.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] dm cache metadata: replace deprecated strncpy with strscpy
On Mon, 25 Sep 2023 06:13:12 +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.
>
> It seems `cmd->policy_name` is intended to be NUL-terminated based on a
> now changed line of code from Commit (c6b4fcbad044e6ff "dm: add cache
> target"):
> | if (strcmp(cmd->policy_name, policy_name)) { // ...
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] dm cache metadata: replace deprecated strncpy with strscpy
https://git.kernel.org/kees/c/5d9bc443188f
Take care,
--
Kees Cook
Powered by blists - more mailing lists