* [PATCH] initramfs: Replace strcpy() with strscpy() in find_link()
@ 2025-09-12 6:47 Thorsten Blum
2025-09-12 18:05 ` Justin Stitt
2025-09-15 12:52 ` Christian Brauner
0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-09-12 6:47 UTC (permalink / raw)
To: Alexander Viro, Christian Brauner, Jan Kara
Cc: linux-hardening, Thorsten Blum, linux-fsdevel, linux-kernel
strcpy() is deprecated; use strscpy() instead.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
init/initramfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/init/initramfs.c b/init/initramfs.c
index 097673b97784..6745e3fbc7ab 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -108,7 +108,7 @@ static char __init *find_link(int major, int minor, int ino,
q->minor = minor;
q->ino = ino;
q->mode = mode;
- strcpy(q->name, name);
+ strscpy(q->name, name);
q->next = NULL;
*p = q;
hardlink_seen = true;
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] initramfs: Replace strcpy() with strscpy() in find_link()
2025-09-12 6:47 [PATCH] initramfs: Replace strcpy() with strscpy() in find_link() Thorsten Blum
@ 2025-09-12 18:05 ` Justin Stitt
2025-09-15 12:52 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Justin Stitt @ 2025-09-12 18:05 UTC (permalink / raw)
To: Thorsten Blum
Cc: Alexander Viro, Christian Brauner, Jan Kara, linux-hardening,
linux-fsdevel, linux-kernel
Hi,
On Fri, Sep 12, 2025 at 08:47:24AM +0200, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.
>
> Link: https://github.com/KSPP/linux/issues/88
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Justin Stitt <justinstitt@google.com>
> ---
> init/initramfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/init/initramfs.c b/init/initramfs.c
> index 097673b97784..6745e3fbc7ab 100644
> --- a/init/initramfs.c
> +++ b/init/initramfs.c
> @@ -108,7 +108,7 @@ static char __init *find_link(int major, int minor, int ino,
> q->minor = minor;
> q->ino = ino;
> q->mode = mode;
> - strcpy(q->name, name);
> + strscpy(q->name, name);
> q->next = NULL;
> *p = q;
> hardlink_seen = true;
> --
> 2.51.0
>
>
Thanks
Justin
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] initramfs: Replace strcpy() with strscpy() in find_link()
2025-09-12 6:47 [PATCH] initramfs: Replace strcpy() with strscpy() in find_link() Thorsten Blum
2025-09-12 18:05 ` Justin Stitt
@ 2025-09-15 12:52 ` Christian Brauner
1 sibling, 0 replies; 3+ messages in thread
From: Christian Brauner @ 2025-09-15 12:52 UTC (permalink / raw)
To: Thorsten Blum
Cc: Christian Brauner, linux-hardening, linux-fsdevel, linux-kernel,
Alexander Viro, Jan Kara
On Fri, 12 Sep 2025 08:47:24 +0200, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.
>
>
Applied to the vfs-6.18.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.18.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.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.18.misc
[1/1] initramfs: Replace strcpy() with strscpy() in find_link()
https://git.kernel.org/vfs/vfs/c/afd77d2050c3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-15 12:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12 6:47 [PATCH] initramfs: Replace strcpy() with strscpy() in find_link() Thorsten Blum
2025-09-12 18:05 ` Justin Stitt
2025-09-15 12:52 ` Christian Brauner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.