From: "Jörn Engel" <joern@logfs.org>
To: Ingo van Lil <inguin@gmx.de>
Cc: linux-kernel@vger.kernel.org, David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] Memory corruption in block2mtd.c
Date: Thu, 20 Mar 2008 18:35:16 +0100 [thread overview]
Message-ID: <20080320173516.GA3977@logfs.org> (raw)
In-Reply-To: <47E27680.5070306@gmx.de>
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@gmx.de>
Acked-by: Joern Engel <joern@lazybastard.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@vger.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
prev parent reply other threads:[~2008-03-20 18:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 14:36 [PATCH] Memory corruption in block2mtd.c Ingo van Lil
2008-03-20 17:35 ` Jörn Engel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080320173516.GA3977@logfs.org \
--to=joern@logfs.org \
--cc=dwmw2@infradead.org \
--cc=inguin@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.