提交 8e08b756 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[PATCH] module: strlen_user() race fix

Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 48b8c100
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册