aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-02-07 15:58:45 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-07 19:12:32 -0500
commit8e08b756869eeb08ace17ad64c2a8cb97b18e856 (patch)
treef25b68e82001f1abaa9e9c25e663f8945d37c96d /kernel
parent48b8c10056d22ecc070bbfcbbfc8f84d13181178 (diff)
[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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index e058aedf6b93..5aad477ddc79 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1670,6 +1670,9 @@ static struct module *load_module(void __user *umod,
1670 goto free_mod; 1670 goto free_mod;
1671 } 1671 }
1672 1672
1673 /* Userspace could have altered the string after the strlen_user() */
1674 args[arglen - 1] = '\0';
1675
1673 if (find_module(mod->name)) { 1676 if (find_module(mod->name)) {
1674 err = -EEXIST; 1677 err = -EEXIST;
1675 goto free_mod; 1678 goto free_mod;