lkml.org 
[lkml]   [2001]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectboundary condition bug in do_mmap()
Hello

There seems to be a boundary condition bug in do_mmap()
(include/linux/mm.h). It is in kernels as late as 2.4.4 (not sure about
later). I saw it reported on a mailing list a year ago but I guess it
didn't make it to the right place.

In the inline function do_mmap(), there is a check for overflow of the
topmost address (line 449 of include/linux/mm.h in the 2.4.4 kernel I
have):

if ((offset + PAGE_ALIGN(len)) < offset)

This test causes the function to return -EINVAL if offset is 0xfffff000
and len is 0x1000, although these should be valid values to map the last
4K according to the mmap() man page.

Please forward this to the right place. I couldn't find anyone specific
in the MAINTAINERS file.

Thank you,
Tania

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

\
 
 \ /
  Last update: 2005-03-22 12:54    [W:0.074 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site