linux-uconsole/kernel/events
Peter Zijlstra f21e5918a9 perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[]
commit 4411ec1d19 upstream.

> kernel/events/ring_buffer.c:871 perf_mmap_to_page() warn: potential spectre issue 'rb->aux_pages'

Userspace controls @pgoff through the fault address. Sanitize the
array index before doing the array dereference.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: <stable@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-16 10:06:52 +02:00
..
callchain.c perf: Remove superfluous allocation error check 2018-05-16 10:06:50 +02:00
core.c perf/core: Fix the perf_cpu_time_max_percent check 2018-05-16 10:06:45 +02:00
hw_breakpoint.c perf/hwbp: Simplify the perf-hwbp code, fix documentation 2018-04-08 11:51:56 +02:00
internal.h perf: Fix AUX buffer refcounting 2015-07-06 14:08:30 +02:00
Makefile ftrace: allow architectures to specify ftrace compile options 2015-01-29 09:19:19 +01:00
ring_buffer.c perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[] 2018-05-16 10:06:52 +02:00
uprobes.c uprobes: Fix the memcg accounting 2016-09-15 08:27:53 +02:00