• Zou Nanhai's avatar
    [PATCH] ia64/x86_64/s390 overlapping vma fix · 3b539082
    Zou Nanhai authored
    IA64 is also vulnerable to the huge-vma-in-executable bug in 64 bit elf
    support, it just insert a vma of zero page without checking overlap, so user
    can construct a elf with section begin from 0x0 to trigger this BUGON().
    
    However, I think it's safe to check overlap before we actually insert a vma
    into vma list.  And I also feel check vma overlap everywhere is unnecessary,
    because invert_vm_struct will check it again, so the check is duplicated.
    It's better to have invert_vm_struct return a value then let caller check if
    it successes.  Here is a patch against 2.6.10.rc2-mm3 I have tested it on
    i386, x86_64 and ia64 machines.
    Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
    Signed-off-by: default avatarZou Nan hai <Nanhai.zou@intel.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    3b539082
mmap.c 50.9 KB