Merge tag 'module-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
Pull module patches from Rusty Russell, who really sells them: "Three trivial patches of no real utility. Modules are boring." But to make things slightly more exciting, he adds: "Fortunately David Howells is looking to change this, with his module signing patchset. But that's for next merge window... Cheers, Rusty." * tag 'module-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: Guard check in module loader against integer overflow modpost: use proper kernel style for autogenerated files modpost: Stop grab_file() from leaking filedescriptors if fstat() fails
This commit is contained in:
+2
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user