[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <168676844721.1964221.12024901543377074461.b4-ty@chromium.org>
Date: Wed, 14 Jun 2023 11:47:28 -0700
From: Kees Cook <keescook@...omium.org>
To: azeemshaikh38@...il.com
Cc: Kees Cook <keescook@...omium.org>, mbenes@...e.cz,
bpf@...r.kernel.org, maninder1.s@...sung.com,
alan.maguire@...cle.com, peterz@...radead.org,
thunder.leizhen@...wei.com, linux@...ssschuh.net,
christian.koenig@....com, mcgrof@...nel.org,
linux@...musvillemoes.dk, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org, gregkh@...uxfoundation.org,
christophe.jaillet@...adoo.fr
Subject: Re: [PATCH] kallsyms: Replace all non-returning strlcpy with strscpy
On Wed, 14 Jun 2023 01:03:54 +0000, Azeem Shaikh wrote:
> strlcpy() reads the entire source buffer first.
> This read may exceed the destination size limit.
> This is both inefficient and can lead to linear read
> overflows if a source string is not NUL-terminated [1].
> In an effort to remove strlcpy() completely [2], replace
> strlcpy() here with strscpy().
> No return values were used, so direct replacement is safe.
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] kallsyms: Replace all non-returning strlcpy with strscpy
https://git.kernel.org/kees/c/5a5d3a09dd76
--
Kees Cook
Powered by blists - more mailing lists