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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon,  4 Jul 2011 16:20:17 +0200
From:	Julia Lawall <julia@...u.dk>
To:	David Woodhouse <dwmw2@...radead.org>
Cc:	kernel-janitors@...r.kernel.org,
	Joakim Tjernlund <joakim.tjernlund@...nsmode.se>,
	Tadashi Abe <tabe@...sta.com>,
	Lucas De Marchi <lucas.demarchi@...fusion.mobi>,
	Stefani Seibold <stefani@...bold.net>,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drivers/mtd/lpddr/lpddr_cmds.c: eliminate double free

From: Julia Lawall <julia@...u.dk>

The only call to lpddr_cmdset is in the function defined in lpddr_probe
drivers/mtd/lpddr/qinfo_probe.c.  If the result of calling lpddr_cmdset is
NULL, this function frees lpddr.  So lpddr should not be freed in
lpddr_cmdset.

Signed-off-by: Julia Lawall <julia@...u.dk>

---
 drivers/mtd/lpddr/lpddr_cmds.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index 65655dd..b7f265e 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -89,7 +89,6 @@ struct mtd_info *lpddr_cmdset(struct map_info *map)
 	shared = kmalloc(sizeof(struct flchip_shared) * lpddr->numchips,
 						GFP_KERNEL);
 	if (!shared) {
-		kfree(lpddr);
 		kfree(mtd);
 		return NULL;
 	}

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