Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e08b756 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds
Browse files

[PATCH] module: strlen_user() race fix



Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 48b8c100
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;