]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - fs/binfmt_elf.c
Merge tag 'pinctrl-v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[mirror_ubuntu-hirsute-kernel.git] / fs / binfmt_elf.c
index 83732fef510d284032a16fb2f7b95c4f94ad1dd3..bdb201230bae93c408cf1972b6f9bb92ad37e478 100644 (file)
@@ -1599,6 +1599,8 @@ static int fill_files_note(struct memelfnote *note)
 
        /* *Estimated* file count and total data size needed */
        count = current->mm->map_count;
+       if (count > UINT_MAX / 64)
+               return -EINVAL;
        size = count * 64;
 
        names_ofs = (2 + 3 * count) * sizeof(data[0]);