]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 16:06:35 +0000 (08:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 16:06:35 +0000 (08:06 -0800)
added patches:
perf-ftrace-fix-paranoid-level-for-enabling-function-tracer.patch

queue-3.4/perf-ftrace-fix-paranoid-level-for-enabling-function-tracer.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/perf-ftrace-fix-paranoid-level-for-enabling-function-tracer.patch b/queue-3.4/perf-ftrace-fix-paranoid-level-for-enabling-function-tracer.patch
new file mode 100644 (file)
index 0000000..afc8b3b
--- /dev/null
@@ -0,0 +1,46 @@
+From 12ae030d54ef250706da5642fc7697cc60ad0df7 Mon Sep 17 00:00:00 2001
+From: Steven Rostedt <rostedt@goodmis.org>
+Date: Tue, 5 Nov 2013 12:51:11 -0500
+Subject: perf/ftrace: Fix paranoid level for enabling function tracer
+
+From: Steven Rostedt <rostedt@goodmis.org>
+
+commit 12ae030d54ef250706da5642fc7697cc60ad0df7 upstream.
+
+The current default perf paranoid level is "1" which has
+"perf_paranoid_kernel()" return false, and giving any operations that
+use it, access to normal users. Unfortunately, this includes function
+tracing and normal users should not be allowed to enable function
+tracing by default.
+
+The proper level is defined at "-1" (full perf access), which
+"perf_paranoid_tracepoint_raw()" will only give access to. Use that
+check instead for enabling function tracing.
+
+Reported-by: Dave Jones <davej@redhat.com>
+Reported-by: Vince Weaver <vincent.weaver@maine.edu>
+Tested-by: Vince Weaver <vincent.weaver@maine.edu>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Ingo Molnar <mingo@kernel.org>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Frederic Weisbecker <fweisbec@gmail.com>
+CVE: CVE-2013-2930
+Fixes: ced39002f5ea ("ftrace, perf: Add support to use function tracepoint in perf")
+Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/trace/trace_event_perf.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/trace/trace_event_perf.c
++++ b/kernel/trace/trace_event_perf.c
+@@ -26,7 +26,7 @@ static int perf_trace_event_perm(struct
+ {
+       /* The ftrace function trace is allowed only for root. */
+       if (ftrace_event_is_function(tp_event) &&
+-          perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN))
++          perf_paranoid_tracepoint_raw() && !capable(CAP_SYS_ADMIN))
+               return -EPERM;
+       /* No tracing, just counting, so no obvious leak */
index 9c34137bced6f31065e2eca6ee3b8a5c957c0ffd..0a3703121c48e8f4cde5c655d3354a1ba53dd190 100644 (file)
@@ -16,3 +16,4 @@ sunrpc-don-t-map-ekeyexpired-to-eacces-in-call_refreshresult.patch
 nest-rename_lock-inside-vfsmount_lock.patch
 exec-do-not-abuse-cred_guard_mutex-in-threadgroup_lock.patch
 include-linux-fs.h-disable-preempt-when-acquire-i_size_seqcount-write-lock.patch
+perf-ftrace-fix-paranoid-level-for-enabling-function-tracer.patch