fs, elf: make sure to page align bss in load_elf_library

Linux Kernel / Linux Kernel - Oscar Salvador [suse.de] - 14 July 2018 18:11 EDT

The current code does not make sure to page align bss before calling
vm_brk(), and this can lead to a VM_BUG_ON() in __mm_populate() due to the requested lenght not being correctly aligned.

Let us make sure to align it properly.

Kees: only applicable to CONFIG_USELIB kernels: 32-bit and configured for libc5.

Link: http://lkml.kernel.org/r/20180705145539.9627-1-osalvador@techadventures.net

24962af7e104 fs, elf: make sure to page align bss in load_elf_library
fs/binfmt_elf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Upstream: git.kernel.org


  • Share