[PATCH] hostfs: fix string handling in __dentry_name()
Richard Weinberger
richard at nod.at
Sun Jan 19 05:36:16 PST 2025
----- Ursprüngliche Mail -----
> Von: "Al Viro" <viro at zeniv.linux.org.uk>
> An: "richard" <richard at nod.at>
> CC: "linux-um" <linux-um at lists.infradead.org>, "linux-fsdevel" <linux-fsdevel at vger.kernel.org>
> Gesendet: Samstag, 18. Januar 2025 00:09:13
> Betreff: [PATCH] hostfs: fix string handling in __dentry_name()
> [in viro/vfs.git#fixes, going to Linus unless anyone objects]
>
> strcpy() should not be used with destination potentially overlapping
> the source; what's more, strscpy() in there is pointless - we already
> know the amount we want to copy; might as well use memcpy().
>
> Fixes: c278e81b8a02 "hostfs: Remove open coded strcpy()"
Hmm, AFAICT the open coded strcpy() was also never safe wrt. overlapping strings.
Beside of that:
Acked-by: Richard Weinberger <richard at nod.at>
Thanks,
//richard
More information about the linux-um
mailing list