lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-3c235a337e205da0f614e456be72881483dcde6e@git.kernel.org>
Date:	Tue, 22 Sep 2009 08:39:36 GMT
From:	tip-bot for Li Zefan <lizf@...fujitsu.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	lizf@...fujitsu.com, jolsa@...hat.com, fweisbec@...il.com,
	rostedt@...dmis.org, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:tracing/urgent] tracing: Fix off-by-one in trace_get_user()

Commit-ID:  3c235a337e205da0f614e456be72881483dcde6e
Gitweb:     http://git.kernel.org/tip/3c235a337e205da0f614e456be72881483dcde6e
Author:     Li Zefan <lizf@...fujitsu.com>
AuthorDate: Tue, 22 Sep 2009 13:51:54 +0800
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 22 Sep 2009 10:28:53 +0200

tracing: Fix off-by-one in trace_get_user()

Leave the last slot for the tailing '\0'.

Signed-off-by: Li Zefan <lizf@...fujitsu.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
LKML-Reference: <4AB865FA.5080801@...fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


---
 kernel/trace/trace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index a35925d..ae17453 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -415,7 +415,7 @@ int trace_get_user(struct trace_parser *parser, const char __user *ubuf,
 
 	/* read the non-space input */
 	while (cnt && !isspace(ch)) {
-		if (parser->idx < parser->size)
+		if (parser->idx < parser->size - 1)
 			parser->buffer[parser->idx++] = ch;
 		else {
 			ret = -EINVAL;
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ