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 <arjan@linux.intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
  • Loading branch information
Arjan van de Ven authored and Peter Zijlstra committed Jul 22, 2009
1 parent 9b7019a commit c9f73a3
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 @@ -2666,6 +2666,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 c9f73a3

Please sign in to comment.