[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230515-seenotrettung-variieren-10995fad7802@brauner>
Date: Mon, 15 May 2023 09:50:25 +0200
From: Christian Brauner <brauner@...nel.org>
To: Azeem Shaikh <azeemshaikh38@...il.com>
Cc: Christian Brauner <brauner@...nel.org>,
linux-hardening@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
Alexander Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH] vfs: Replace all non-returning strlcpy with strscpy
On Wed, 10 May 2023 22:11:19 +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.
>
> [...]
I sincerely hope we'll be done with swapping out various string
functions for one another at some point. Such patches always seems
benign and straightforward but the potential for subtle bugs is
feels rather high...
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc
[1/1] vfs: Replace all non-returning strlcpy with strscpy
https://git.kernel.org/vfs/vfs/c/3c5d4d803c60
Powered by blists - more mailing lists