diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-11 10:31:07 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-07-11 10:31:07 +0100 |
| commit | 9e9fd65d1fa51d919d54d731be0e66492b5b6c5a (patch) | |
| tree | a1c7bd35ccff62ff2e678514d3599110f18f113a /kernel/module.c | |
| parent | 05644147064acabb8587c4cbd690047494f7b3a1 (diff) | |
| parent | 5b063b87deba33ed1676db9d16c52ede662132d8 (diff) | |
Merge branch 'pl022' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into spi-next
Diffstat (limited to 'kernel/module.c')
| -rw-r--r-- | kernel/module.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c index 78ac6ec1e425..4edbd9c11aca 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -2429,7 +2429,8 @@ static int copy_and_check(struct load_info *info, goto free_hdr; } - if (len < hdr->e_shoff + hdr->e_shnum * sizeof(Elf_Shdr)) { + if (hdr->e_shoff >= len || + hdr->e_shnum * sizeof(Elf_Shdr) > len - hdr->e_shoff) { err = -ENOEXEC; goto free_hdr; } @@ -2953,7 +2954,7 @@ static struct module *load_module(void __user *umod, /* Module is ready to execute: parsing args may do that. */ err = parse_args(mod->name, mod->args, mod->kp, mod->num_kp, - -32768, 32767, NULL); + -32768, 32767, &ddebug_dyndbg_module_param_cb); if (err < 0) goto unlink; |
