kern/64573: mmap with PROT_NONE, but still could be read

David G. Lawrence dg at dglawrence.com
Tue Apr 13 20:44:20 PDT 2004


>  First, there is a much simpler program to reproduce the bug.  This is
>  from 5.2-current as of April 6, 2004.
>  
>  /*
>   * Test mmap() and PROT_NONE.  The first printf() should fail with seg
>   * fault or bus error because the segment has protection PROT_NONE,
>   * but actually, it runs ok.
>   */

   Why would anyone want to mmap a file with PROT_NONE?

-DG

David G. Lawrence
President
Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500
TeraSolutions, Inc. - http://www.terasolutions.com - (888) 346 7175
The FreeBSD Project - http://www.freebsd.org
Pave the road of life with opportunities.


More information about the freebsd-bugs mailing list