mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
[PATCH] module: strlen_user() race fix
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
48b8c10056
commit
8e08b75686
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user