diff options
| author | Steven Whitehouse <steve@men-an-tol.chygwyn.com> | 2006-02-23 09:49:43 +0000 |
|---|---|---|
| committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-02-23 09:49:43 +0000 |
| commit | d35462b4bb847b68321c55e95c926aa485aecce2 (patch) | |
| tree | b08e18bf6e672633402871ee763102fdb5e63229 /kernel/module.c | |
| parent | 91ffd7db71e7451f89941a8f428b4daa2a7c1e38 (diff) | |
| parent | 9e956c2dac9bec602ed1ba29181b45ba6d2b6448 (diff) | |
Merge branch 'master'
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/module.c b/kernel/module.c index 618ed6e23ecc..5aad477ddc79 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; @@ -2092,7 +2095,8 @@ static unsigned long mod_find_symname(struct module *mod, const char *name) unsigned int i; for (i = 0; i < mod->num_symtab; i++) - if (strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0) + if (strcmp(name, mod->strtab+mod->symtab[i].st_name) == 0 && + mod->symtab[i].st_info != 'U') return mod->symtab[i].st_value; return 0; } |
