Re: [PATCH net-next] net/devlink: Use strscpy() to copy strings into arrays
From: Kees Cook
Date: Wed Jun 10 2026 - 17:14:44 EST
On Tue, Jun 09, 2026 at 04:13:38PM +0100, David Laight wrote:
> My aim is to get to the point where the calling strcpy() is invalid
> unless it is used to copy a string literal into an array.
> If/when all the .c files are changed the .h file change can be committed
> to stop any new potential unbounded copies being added.
Here's what I did a while ago in a test tree of mine, but for strlcat:
---