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-next>] [day] [month] [year] [list]
Message-Id: <1362022197-38929-1-git-send-email-dsahern@gmail.com>
Date:	Wed, 27 Feb 2013 20:29:57 -0700
From:	David Ahern <dsahern@...il.com>
To:	acme@...stprotocols.net, linux-kernel@...r.kernel.org
Cc:	David Ahern <dsahern@...il.com>,
	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>,
	Dongsoo Nathaniel Kim <dongsoo.kim@...il.com>
Subject: [PATCH] perf kvm: fix segfault by initializing file_name to NULL

Dongsoo reported that perf-kvm was segfaulting. The bug was introduced by
commit 3786063 which moved file_name from struct perf_kvm which was
initialized on the stack to an uninitialized stack variable. Fix by
initializing.

Needs to be applied to 3.7 and 3.8 as well.

Signed-off-by: David Ahern <dsahern@...il.com>
Cc: Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
Cc: Dongsoo Nathaniel Kim <dongsoo.kim@...il.com>
---
 tools/perf/builtin-kvm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index ca3f80e..e55701d 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -973,7 +973,7 @@ __cmd_buildid_list(const char *file_name, int argc, const char **argv)
 
 int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused)
 {
-	const char *file_name;
+	const char *file_name = NULL;
 
 	const struct option kvm_options[] = {
 		OPT_STRING('i', "input", &file_name, "file",
-- 
1.7.10.1

--
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