summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/module.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index e058aed..5aad477 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1670,6 +1670,9 @@ static struct module *load_module(void __user *umod,
goto free_mod;
}
+ /* Userspace could have altered the string after the strlen_user() */
+ args[arglen - 1] = '\0';
+
if (find_module(mod->name)) {
err = -EEXIST;
goto free_mod;
OpenPOWER on IntegriCloud