[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <168478437620.244538.12858579380072843624.b4-ty@chromium.org>
Date: Mon, 22 May 2023 12:39:36 -0700
From: Kees Cook <keescook@...omium.org>
To: azeemshaikh38@...il.com, anna@...nel.org,
trond.myklebust@...merspace.com
Cc: Kees Cook <keescook@...omium.org>, linux-nfs@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] NFS: Prefer strscpy over strlcpy calls
On Fri, 12 May 2023 15:57:49 +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].
> Check for strscpy()'s return value of -E2BIG on truncate for safe
> replacement with strlcpy().
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] NFS: Prefer strscpy over strlcpy calls
https://git.kernel.org/kees/c/8ca25e00cf81
--
Kees Cook
Powered by blists - more mailing lists