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]
Date:	Mon, 12 Oct 2009 15:07:32 +0200
From:	Eric Sesterhenn <eric.sesterhenn@...xperts.de>
To:	linux-kernel@...r.kernel.org
Subject: [Patch] Fix leak in usermode linux

hi,

this was spotted by cppcheck, if find_tempdir fails,
we dont free tempname.

Signed-off-by: Eric Sesterhenn <eric.sesterhenn@...xperts.de>

--- linux/arch/um/os-Linux/mem.c.orig	2009-10-12 15:04:28.000000000 +0200
+++ linux/arch/um/os-Linux/mem.c	2009-10-12 15:04:37.000000000 +0200
@@ -175,7 +175,7 @@ static int __init make_tempfile(const ch

 	find_tempdir();
 	if ((tempdir == NULL) || (strlen(tempdir) >= MAXPATHLEN))
-		return -1;
+		goto out;

 	if (template[0] != '/')
 		strcpy(tempname, tempdir);

-- 
LSE Leading Security Experts GmbH, Postfach 100121, 64201 Darmstadt
Unternehmenssitz: Weiterstadt, Amtsgericht Darmstadt: HRB8649
Geschäftsführer: Oliver Michel, Sven Walther

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