Home Home > GIT Browse > openSUSE-15.0
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2013-05-15 09:26:33 +0200
committerJiri Kosina <jkosina@suse.cz>2013-05-15 09:26:33 +0200
commit5e244d71e04c1b45a88aca2e76a3bd9a493289ac (patch)
treee5fe52a3f14d78e463f5cdeeb59ba7a34e6bc8f4
parent395d7341e4701d73c2405a0a2590ab3e54b9b35d (diff)
- patches.fixes/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch:rpm-3.0.74-0.6.8
perf: Treat attr.config as u64 in perf_swevent_init() (bnc#819789, CVE-2013-2094).
-rw-r--r--kernel-source.changes7
-rw-r--r--patches.fixes/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch39
-rw-r--r--series.conf1
3 files changed, 47 insertions, 0 deletions
diff --git a/kernel-source.changes b/kernel-source.changes
index 08c29249db..e5e228c154 100644
--- a/kernel-source.changes
+++ b/kernel-source.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed May 15 09:26:29 CEST 2013 - jkosina@suse.cz
+
+- patches.fixes/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch:
+ perf: Treat attr.config as u64 in perf_swevent_init()
+ (bnc#819789, CVE-2013-2094).
+
+-------------------------------------------------------------------
Wed Apr 24 18:03:13 CEST 2013 - jdelvare@suse.de
- patches.kernel.org/revert-dmi_scan-changes-1.patch:
diff --git a/patches.fixes/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch b/patches.fixes/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch
new file mode 100644
index 0000000000..2bf8eafe72
--- /dev/null
+++ b/patches.fixes/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch
@@ -0,0 +1,39 @@
+From: Tommi Rantala <tt.rantala@gmail.com>
+Subject: perf: Treat attr.config as u64 in perf_swevent_init()
+Date: Sat Apr 13 22:49:14 2013 +0300
+Git-commit: 8176cced706b5e5d15887584150764894e94e02f
+Patch-mainline: v3.9-rc8
+References: bnc#819789, CVE-2013-2094
+Signed-off-by: Tony Jones <tonyj@suse.de>
+
+ perf: Treat attr.config as u64 in perf_swevent_init()
+
+ 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>
+
+diff --git a/kernel/events/core.c b/kernel/events/core.c
+index 7e0962e..4d3124b 100644
+--- a/kernel/events/core.c
++++ b/kernel/events/core.c
+@@ -5331,7 +5331,7 @@ static void sw_perf_event_destroy(struct perf_event *event)
+
+ 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/series.conf b/series.conf
index 4776771a83..656eedb0d2 100644
--- a/series.conf
+++ b/series.conf
@@ -4077,6 +4077,7 @@
patches.fixes/perf-do-not-set-task_ctx-pointer-in-cpuctx.patch
patches.fixes/perf-do-no-try-to-schedule-task-events.patch
+ patches.fixes/perf-treat-attr.config-as-u64-in-perf_swevent_init.patch
########################################################
# KVM patches