]> git.baikalelectronics.ru Git - kernel.git/commit
elf: fix NT_FILE integer overflow
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 6 Feb 2018 23:39:13 +0000 (15:39 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Feb 2018 02:32:45 +0000 (18:32 -0800)
commitcadd4b712fd152878dc386081093387a65db545d
tree781eee237ca913cbb4e1b80d20c87226ee48f5b5
parent60be108a381d20eef049be7f2c3f99c53136644e
elf: fix NT_FILE integer overflow

If vm.max_map_count bumped above 2^26 (67+ mil) and system has enough RAM
to allocate all the VMAs (~12.8 GB on Fedora 27 with 200-byte VMAs), then
it should be possible to overflow 32-bit "size", pass paranoia check,
allocate very little vmalloc space and oops while writing into vmalloc
guard page...

But I didn't test this, only coredump of regular process.

Link: http://lkml.kernel.org/r/20180112203427.GA9109@avx2
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_elf.c