[PATCH] tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline() (Was: Re: [PATCH] tracing: Resolve stack corruption due to string copy)

2017-05-03 Thread Steven Rostedt
[ Here's the new patch ] From: Amey Telawane Strcpy is inherently not safe, and strlcpy() should be used instead. __trace_find_cmdline() uses strcpy() because the comms saved must have a terminating nul character, but it doesn't hurt to add the extra protection of using

[PATCH] tracing: Use strlcpy() instead of strcpy() in __trace_find_cmdline() (Was: Re: [PATCH] tracing: Resolve stack corruption due to string copy)

2017-05-03 Thread Steven Rostedt
[ Here's the new patch ] From: Amey Telawane Strcpy is inherently not safe, and strlcpy() should be used instead. __trace_find_cmdline() uses strcpy() because the comms saved must have a terminating nul character, but it doesn't hurt to add the extra protection of using strlcpy() instead of

Re: [PATCH] tracing: Resolve stack corruption due to string copy

2017-05-03 Thread Steven Rostedt
On Wed, 3 May 2017 15:41:14 +0530 Amit Pundir wrote: > From: Amey Telawane > > Strcpy has no limit on string being copied which causes > stack corruption leading to kernel panic. Use strlcpy to > resolve the issue by providing length of string to

Re: [PATCH] tracing: Resolve stack corruption due to string copy

2017-05-03 Thread Steven Rostedt
On Wed, 3 May 2017 15:41:14 +0530 Amit Pundir wrote: > From: Amey Telawane > > Strcpy has no limit on string being copied which causes > stack corruption leading to kernel panic. Use strlcpy to > resolve the issue by providing length of string to be copied. > > Cc: sta...@vger.kernel.org >

[PATCH] tracing: Resolve stack corruption due to string copy

2017-05-03 Thread Amit Pundir
From: Amey Telawane Strcpy has no limit on string being copied which causes stack corruption leading to kernel panic. Use strlcpy to resolve the issue by providing length of string to be copied. Cc: sta...@vger.kernel.org Signed-off-by: Amey Telawane

[PATCH] tracing: Resolve stack corruption due to string copy

2017-05-03 Thread Amit Pundir
From: Amey Telawane Strcpy has no limit on string being copied which causes stack corruption leading to kernel panic. Use strlcpy to resolve the issue by providing length of string to be copied. Cc: sta...@vger.kernel.org Signed-off-by: Amey Telawane [AmitP: Cherry-picked this commit from