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-a255a9981a8566a1efabec983b7811e937e662d2@git.kernel.org>
Date:	Thu, 24 Sep 2009 13:16:21 GMT
From:	tip-bot for Eric Dumazet <eric.dumazet@...il.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	eric.dumazet@...il.com, stable@...nel.org, tglx@...utronix.de,
	mingo@...e.hu
Subject: [tip:perf/urgent] perf tools: Fix buffer allocation

Commit-ID:  a255a9981a8566a1efabec983b7811e937e662d2
Gitweb:     http://git.kernel.org/tip/a255a9981a8566a1efabec983b7811e937e662d2
Author:     Eric Dumazet <eric.dumazet@...il.com>
AuthorDate: Thu, 24 Sep 2009 15:05:59 +0200
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Thu, 24 Sep 2009 15:11:23 +0200

perf tools: Fix buffer allocation

"perf top" cores dump on my dev machine, if run from a directory
where vmlinux is present:

  *** glibc detected *** malloc(): memory corruption: 0x085670d0 ***

Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
Cc: <stable@...nel.org>
LKML-Reference: <4ABB6EB7.7000002@...il.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


---
 tools/perf/util/module.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/util/module.c b/tools/perf/util/module.c
index 8f81622..0d8c85d 100644
--- a/tools/perf/util/module.c
+++ b/tools/perf/util/module.c
@@ -423,7 +423,7 @@ static int mod_dso__load_module_paths(struct mod_dso *self)
 	len += strlen(uts.release);
 	len += strlen("/modules.dep");
 
-	dpath = calloc(1, len);
+	dpath = calloc(1, len + 1);
 	if (dpath == NULL)
 		return err;
 
--
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