Patch "test_kmod: avoid potential double free in trigger_config_run_type()" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    test_kmod: avoid potential double free in trigger_config_run_type()

to the 4.14-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:
     test_kmod-avoid-potential-double-free-in-trigger_con.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9ecdd8acd249860ad8566575e776c90324a9b32a
Author: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
Date:   Tue Aug 11 18:36:16 2020 -0700

    test_kmod: avoid potential double free in trigger_config_run_type()
    
    [ Upstream commit 0776d1231bec0c7ab43baf440a3f5ef5f49dd795 ]
    
    Reset the member "test_fs" of the test configuration after a call of the
    function "kfree_const" to a null pointer so that a double memory release
    will not be performed.
    
    Fixes: d9c6a72d6fa2 ("kmod: add test driver to stress test the module loader")
    Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
    Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
    Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
    Acked-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
    Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
    Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
    Cc: Christian Brauner <christian.brauner@xxxxxxxxxx>
    Cc: Chuck Lever <chuck.lever@xxxxxxxxxx>
    Cc: David Howells <dhowells@xxxxxxxxxx>
    Cc: David S. Miller <davem@xxxxxxxxxxxxx>
    Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
    Cc: James Morris <jmorris@xxxxxxxxx>
    Cc: Jarkko Sakkinen <jarkko.sakkinen@xxxxxxxxxxxxxxx>
    Cc: J. Bruce Fields <bfields@xxxxxxxxxxxx>
    Cc: Jens Axboe <axboe@xxxxxxxxx>
    Cc: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
    Cc: Kees Cook <keescook@xxxxxxxxxxxx>
    Cc: Lars Ellenberg <lars.ellenberg@xxxxxxxxxx>
    Cc: Nikolay Aleksandrov <nikolay@xxxxxxxxxxxxxxxxxxx>
    Cc: Philipp Reisner <philipp.reisner@xxxxxxxxxx>
    Cc: Roopa Prabhu <roopa@xxxxxxxxxxxxxxxxxxx>
    Cc: "Serge E. Hallyn" <serge@xxxxxxxxxx>
    Cc: Sergei Trofimovich <slyfox@xxxxxxxxxx>
    Cc: Sergey Kvachonok <ravenexp@xxxxxxxxx>
    Cc: Shuah Khan <shuah@xxxxxxxxxx>
    Cc: Tony Vroon <chainsaw@xxxxxxxxxx>
    Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>
    Link: http://lkml.kernel.org/r/20200610154923.27510-4-mcgrof@xxxxxxxxxx
    Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/lib/test_kmod.c b/lib/test_kmod.c
index cf619795a1822..c0ce0156d54bb 100644
--- a/lib/test_kmod.c
+++ b/lib/test_kmod.c
@@ -747,7 +747,7 @@ static int trigger_config_run_type(struct kmod_test_device *test_dev,
 		break;
 	case TEST_KMOD_FS_TYPE:
 		kfree_const(config->test_fs);
-		config->test_driver = NULL;
+		config->test_fs = NULL;
 		copied = config_copy_test_fs(config, test_str,
 					     strlen(test_str));
 		break;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux