mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* boundary condition bug in do_mmap()
@ 2001-05-30  8:47 Tania Oka
  2001-05-30 20:12 ` Rik van Riel
  0 siblings, 1 reply; 2+ messages in thread
From: Tania Oka @ 2001-05-30  8:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: glenn

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-30 20:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-30  8:47 boundary condition bug in do_mmap() Tania Oka
2001-05-30 20:12 ` Rik van Riel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®