]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Apr 2013 16:41:45 +0000 (09:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Apr 2013 16:41:45 +0000 (09:41 -0700)
added patches:
perf-treat-attr.config-as-u64-in-perf_swevent_init.patch

queue-3.0/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch [new file with mode: 0644]
queue-3.0/series

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 (file)
index 0000000..e4ecaa7
--- /dev/null
@@ -0,0 +1,41 @@
+From 8176cced706b5e5d15887584150764894e94e02f Mon Sep 17 00:00:00 2001
+From: Tommi Rantala <tt.rantala@gmail.com>
+Date: Sat, 13 Apr 2013 22:49:14 +0300
+Subject: perf: Treat attr.config as u64 in perf_swevent_init()
+
+From: Tommi Rantala <tt.rantala@gmail.com>
+
+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 <tt.rantala@gmail.com>
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Cc: davej@redhat.com
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
+Link: http://lkml.kernel.org/r/1365882554-30259-1-git-send-email-tt.rantala@gmail.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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;
index 524843f673a5ef2fb474e83b14212aa4061c0a7f..1d2f1249603cbce46cfd288539400c597a7df45d 100644 (file)
@@ -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