This is a note to let you know that I've just added the patch titled

    dm ioctl: do not leak argv if target message only contains whitespace

to the 3.2-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dm-ioctl-do-not-leak-argv-if-target-message-only-contains-whitespace.patch
and it can be found in the queue-3.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 902c6a96a7cb9c50d2a8aed1788efad0a5d8f04c Mon Sep 17 00:00:00 2001
From: Jesper Juhl <[email protected]>
Date: Wed, 7 Mar 2012 19:09:34 +0000
Subject: dm ioctl: do not leak argv if target message only contains whitespace

From: Jesper Juhl <[email protected]>

commit 902c6a96a7cb9c50d2a8aed1788efad0a5d8f04c upstream.

If 'argc' is zero we jump to the 'out:' label, but this leaks the
(unused) memory that 'dm_split_args()' allocated for 'argv' if the
string being split consisted entirely of whitespace.  Jump to the
'out_argv:' label instead to free up that memory.

Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Alasdair G Kergon <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/md/dm-ioctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1437,7 +1437,7 @@ static int target_message(struct dm_ioct
 
        if (!argc) {
                DMWARN("Empty message received.");
-               goto out;
+               goto out_argv;
        }
 
        table = dm_get_live_table(md);


Patches currently in stable-queue which might be from [email protected] are

queue-3.2/dm-ioctl-do-not-leak-argv-if-target-message-only-contains-whitespace.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to