Commit-ID: df09162550fbb53354f0c88e85b5d0e6129ee9cc Gitweb: http://git.kernel.org/tip/df09162550fbb53354f0c88e85b5d0e6129ee9cc Author: Chris Wright <chrisw@xxxxxxxxxxxx> AuthorDate: Thu, 9 Sep 2010 16:34:59 -0700 Committer: Steven Rostedt <rostedt@xxxxxxxxxxx> CommitDate: Thu, 9 Sep 2010 22:43:49 -0400 tracing: t_start: reset FTRACE_ITER_HASH in case of seek/pread Be sure to avoid entering t_show() with FTRACE_ITER_HASH set without having properly started the iterator to iterate the hash. This case is degenerate and, as discovered by Robert Swiecki, can cause t_hash_show() to misuse a pointer. This causes a NULL ptr deref with possible security implications. Tracked as CVE-2010-3079. Cc: Robert Swiecki <swiecki@xxxxxxxxxx> Cc: Eugene Teo <eugene@xxxxxxxxxx> Cc: <stable@xxxxxxxxxx> Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx> Signed-off-by: Steven Rostedt <rostedt@xxxxxxxxxxx> --- kernel/trace/ftrace.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 83a16e9..fa7ece6 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -1510,6 +1510,8 @@ static void *t_start(struct seq_file *m, loff_t *pos) if (*pos > 0) return t_hash_start(m, pos); iter->flags |= FTRACE_ITER_PRINTALL; + /* reset in case of seek/pread */ + iter->flags &= ~FTRACE_ITER_HASH; return iter; } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |