Skip to content

Commit

Permalink
perf: fix stack data leak
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
fenrus75 authored and torvalds committed Jul 22, 2009
1 parent 61fe087 commit 0dc3d52
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -2665,6 +2665,7 @@ static void perf_counter_output(struct perf_counter *counter, int nmi,
header.size += sizeof(cpu_entry);

cpu_entry.cpu = raw_smp_processor_id();
cpu_entry.reserved = 0;
}

if (sample_type & PERF_SAMPLE_PERIOD)
Expand Down

0 comments on commit 0dc3d52

Please sign in to comment.