mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 18:39:59 +00:00
perf util: Fix bad memory access in trace info.
[ Upstream commit a72f642613
]
In the write to the output_fd in the error condition of
record_saved_cmdline(), we are writing 8 bytes from a memory location on
the stack that contains a primitive that is only 4 bytes in size.
Change the primitive to 8 bytes in size to match the size of the write
in order to avoid reading unknown memory from the stack.
Signed-off-by: Chris Phlipot <cphlipot0@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180829061954.18871-1-cphlipot0@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9d7bc329c1
commit
4095fd29fe
1 changed files with 1 additions and 1 deletions
|
@ -379,7 +379,7 @@ static int record_ftrace_printk(void)
|
|||
|
||||
static int record_saved_cmdline(void)
|
||||
{
|
||||
unsigned int size;
|
||||
unsigned long long size;
|
||||
char *path;
|
||||
struct stat st;
|
||||
int ret, err = 0;
|
||||
|
|
Loading…
Reference in a new issue