[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <168729290244.455922.3413650622482867613.b4-ty@chromium.org>
Date: Tue, 20 Jun 2023 13:28:28 -0700
From: Kees Cook <keescook@...omium.org>
To: anton.ivanov@...bridgegreys.com, richard@....at,
azeemshaikh38@...il.com, maxk@....qualcomm.com,
johannes@...solutions.net
Cc: Kees Cook <keescook@...omium.org>, linux-um@...ts.infradead.org,
Jason@...c4.com, linux-hardening@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] uml: Replace strlcpy with strscpy
On Wed, 14 Jun 2023 00:36:04 +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.
>
> [...]
Build tested with "ARCH=um".
Applied to for-next/hardening, thanks!
[1/1] uml: Replace strlcpy with strscpy
https://git.kernel.org/kees/c/e1ca49d0291a
--
Kees Cook
Powered by blists - more mailing lists