From: Ingo van Lil <inguin@gmx.de>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Memory corruption in block2mtd.c
Date: Thu, 20 Mar 2008 15:36:48 +0100 [thread overview]
Message-ID: <47E27680.5070306@gmx.de> (raw)
Hello everybody,
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.
Cheers,
Ingo
Signed-off-by: Ingo van Lil <inguin@gmx.de>
---
--- 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");
}
}
next reply other threads:[~2008-03-20 14:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-20 14:36 Ingo van Lil [this message]
2008-03-20 17:35 ` [PATCH] Memory corruption in block2mtd.c Jörn Engel
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=47E27680.5070306@gmx.de \
--to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox