From: Greg Kroah-Hartman Date: Mon, 22 Apr 2013 16:41:45 +0000 (-0700) Subject: 3.0-stable patches X-Git-Tag: v3.8.9~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc4e1c8c841989618237f70250bbabd6d747b237;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: perf-treat-attr.config-as-u64-in-perf_swevent_init.patch --- diff --git a/queue-3.0/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch b/queue-3.0/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch new file mode 100644 index 00000000000..e4ecaa72fc9 --- /dev/null +++ b/queue-3.0/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch @@ -0,0 +1,41 @@ +From 8176cced706b5e5d15887584150764894e94e02f Mon Sep 17 00:00:00 2001 +From: Tommi Rantala +Date: Sat, 13 Apr 2013 22:49:14 +0300 +Subject: perf: Treat attr.config as u64 in perf_swevent_init() + +From: Tommi Rantala + +commit 8176cced706b5e5d15887584150764894e94e02f upstream. + +Trinity discovered that we fail to check all 64 bits of +attr.config passed by user space, resulting to out-of-bounds +access of the perf_swevent_enabled array in +sw_perf_event_destroy(). + +Introduced in commit b0a873ebb ("perf: Register PMU +implementations"). + +Signed-off-by: Tommi Rantala +Cc: Peter Zijlstra +Cc: davej@redhat.com +Cc: Paul Mackerras +Cc: Arnaldo Carvalho de Melo +Link: http://lkml.kernel.org/r/1365882554-30259-1-git-send-email-tt.rantala@gmail.com +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/events/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/events/core.c ++++ b/kernel/events/core.c +@@ -5440,7 +5440,7 @@ static void sw_perf_event_destroy(struct + + static int perf_swevent_init(struct perf_event *event) + { +- int event_id = event->attr.config; ++ u64 event_id = event->attr.config; + + if (event->attr.type != PERF_TYPE_SOFTWARE) + return -ENOENT; diff --git a/queue-3.0/series b/queue-3.0/series index 524843f673a..1d2f1249603 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -14,3 +14,4 @@ ath9k_htc-accept-1.x-firmware-newer-than-1.3.patch sched-convert-bug_on-s-in-try_to_wake_up_local-to-warn_on_once-s.patch crypto-algif-suppress-sending-source-address-information.patch revert-sysfs-fix-race-between-readdir-and-lseek.patch +perf-treat-attr.config-as-u64-in-perf_swevent_init.patch