commit | 8e08b756869eeb08ace17ad64c2a8cb97b18e856 | [log] [tgz] |
---|---|---|
author | Andrew Morton <akpm@osdl.org> | Tue Feb 07 12:58:45 2006 -0800 |
committer | Linus Torvalds <torvalds@g5.osdl.org> | Tue Feb 07 16:12:32 2006 -0800 |
tree | f25b68e82001f1abaa9e9c25e663f8945d37c96d | |
parent | 48b8c10056d22ecc070bbfcbbfc8f84d13181178 [diff] [blame] |
[PATCH] module: strlen_user() race fix Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 @@ 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;