mtd: memory corruption in block2mtd.c
authorIngo van Lil <inguin@gmx.de>
Mon, 24 Mar 2008 19:29:44 +0000 (12:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 Mar 2008 02:22:19 +0000 (19:22 -0700)
commit2875fb65f8e40401c4b781ebc5002df10485f635
treefe111c02b7aa2c943e7f824aadd6e7fa06da3d0f
parent1312848e92a0686cb5124aa86ea58d55ba795742
mtd: memory corruption in block2mtd.c

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.

Signed-off-by: Ingo van Lil <inguin@gmx.de>
Acked-by: Joern Engel <joern@lazybastard.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: <stable@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mtd/devices/block2mtd.c