Re: 2.4.23 hard lock, 100% reproducible.

Chris Frey
2003-12-07T18:32:14Z

On Sat, Dec 06, 2003 at 08:34:32PM -0800, Mark Symonds wrote:
> Other than that, nothing. Is there a patch out there
> that will simply make 2.4.22 secure? Things run great
> on that kernel.

Here's the relevant section from patch-2.4.23

- Chris

diff -urN linux-2.4.22/mm/mmap.c linux-2.4.23/mm/mmap.c
--- linux-2.4.22/mm/mmap.c 2003-06-13 07:51:39.000000000 -0700
+++ linux-2.4.23/mm/mmap.c 2003-11-28 10:26:21.000000000 -0800
@@ -1041,6 +1041,9 @@
if (!len)
return addr;

+ if ((addr + len) > TASK_SIZE || (addr + len) < addr)
+ return -EINVAL;
+
/*
* mlock MCL_FUTURE?
*/