diff options
author | Andrew Morton <akpm@osdl.org> | 2006-02-07 20:58:45 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-08 00:12:32 (GMT) |
commit | 8e08b756869eeb08ace17ad64c2a8cb97b18e856 (patch) | |
tree | f25b68e82001f1abaa9e9c25e663f8945d37c96d /kernel | |
parent | 48b8c10056d22ecc070bbfcbbfc8f84d13181178 (diff) | |
download | linux-fsl-qoriq-8e08b756869eeb08ace17ad64c2a8cb97b18e856.tar.xz |
[PATCH] module: strlen_user() race fix
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/module.c | 3 |
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; |