Re: 2.4.23 hard lock, 100% reproducible.

From: Chris Frey
Date: Sun Dec 07 2003 - 13:33:37 EST


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?
*/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/