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] [day] [month] [year] [list]
Date:	Thu, 20 Mar 2008 18:35:16 +0100
From:	Jörn Engel <joern@...fs.org>
To:	Ingo van Lil <inguin@....de>
Cc:	linux-kernel@...r.kernel.org, David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH] Memory corruption in block2mtd.c

On Thu, 20 March 2008 15:36:48 +0100, Ingo van Lil wrote:
> 
> the block2mtd driver (drivers/mtd/devices/block2mtd.c) will kfree an
> on-stack pointer when handling an invalid argument line (e.g.
> block2mtd=/dev/loop0,xxx).
> 
> The kfree was added some time ago when "name" was dynamically
> allocated.

Good catch.

> Signed-off-by: Ingo van Lil <inguin@....de>
Acked-by: Joern Engel <joern@...ybastard.org>

> ---
> 
> --- linux-2.6.23.1/drivers/mtd/devices/block2mtd.c.orig	2008-03-20 
> 15:13:49.000000000 +0100
> +++ linux-2.6.23.1/drivers/mtd/devices/block2mtd.c	2008-03-20 
> 15:14:09.000000000 +0100
> @@ -408,7 +408,6 @@
>  	if (token[1]) {
>  		ret = parse_num(&erase_size, token[1]);
>  		if (ret) {
> -			kfree(name);
>  			parse_err("illegal erase size");
>  		}
>  	}
> --
> 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/

Jörn

-- 
It is the mark of an educated mind to be able to entertain a thought
without accepting it.
-- Aristotle
--
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