mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-14 12:37:32 +00:00
perf: fix stack data leak
the "reserved" field was not initialized to zero, resulting in 4 bytes of stack data leaking to userspace.... Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
61fe087059
commit
0dc3d523e8
1 changed files with 1 additions and 0 deletions
|
@ -2665,6 +2665,7 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
|
||||||
header.size += sizeof(cpu_entry);
|
header.size += sizeof(cpu_entry);
|
||||||
|
|
||||||
cpu_entry.cpu = raw_smp_processor_id();
|
cpu_entry.cpu = raw_smp_processor_id();
|
||||||
|
cpu_entry.reserved = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sample_type & PERF_SAMPLE_PERIOD)
|
if (sample_type & PERF_SAMPLE_PERIOD)
|
||||||
|
|
Loading…
Reference in a new issue