Skip to content

Commit

Permalink
[PATCH] module: strlen_user() race fix
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Feb 8, 2006
1 parent 48b8c10 commit 8e08b75
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8e08b75

Please sign in to comment.