[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100918191303.863791076@clark.site>
Date: Sat, 18 Sep 2010 12:12:54 -0700
From: Greg KH <gregkh@...e.de>
To: linux-kernel@...r.kernel.org, stable@...nel.org
Cc: stable-review@...nel.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, alan@...rguk.ukuu.org.uk,
Robert Swiecki <swiecki@...gle.com>,
Eugene Teo <eugene@...hat.com>,
Chris Wright <chrisw@...s-sol.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: [076/129] tracing: t_start: reset FTRACE_ITER_HASH in case of seek/pread
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Chris Wright <chrisw@...s-sol.org>
commit df09162550fbb53354f0c88e85b5d0e6129ee9cc upstream.
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@...gle.com>
Cc: Eugene Teo <eugene@...hat.com>
Signed-off-by: Chris Wright <chrisw@...s-sol.org>
Signed-off-by: Steven Rostedt <rostedt@...dmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
kernel/trace/ftrace.c | 2 ++
1 file changed, 2 insertions(+)
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1510,6 +1510,8 @@ static void *t_start(struct seq_file *m,
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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists