diff -urNp linux-2.4.21/mm/mmap.c linux-2.4.21.SUSE/mm/mmap.c --- linux-2.4.21/mm/mmap.c 2003-09-26 15:26:43.000000000 +0200 +++ linux-2.4.21.SUSE/mm/mmap.c 2003-09-26 15:30:43.000000000 +0200 @@ -1117,6 +1117,9 @@ unsigned long do_brk(unsigned long addr, if (!len) return addr; + if ((addr + len) > TASK_SIZE || (addr + len) < addr) + return -EINVAL; + /* * mlock MCL_FUTURE? */