Re: [PATCH] tracing: Replace deprecated strncpy() with memcpy() for stack_trace_filter_buf
From: Devaansh Kumar
Date: Fri Apr 04 2025 - 09:31:06 EST
On Fri, 4 Apr 2025 at 18:24, Mathieu Desnoyers
<mathieu.desnoyers@xxxxxxxxxxxx> wrote:
> It's not only about the destination, but also about the source length.
>
> AFAIU, turning a strncpy into a memcpy here will overflow reading the
> input @str if the input string is smaller than
> sizeof(stack_trace_filter_buf) + len.
>
> This can trigger page faults or make KASAN unhappy.
I see. I will create a new patch to fix this then