The vm_map_lookup function in sys/vm/vm_map.c in the mmap implementation in the kernel in FreeBSD 9.0 through 9.1-RELEASE-p4 does not properly determine whether a task should have write access to a memory location, which allows local users to bypass filesystem write permissions and consequently gain privileges via a crafted application that leverages read permissions, and makes mmap and ptrace system calls.
http://www.freebsd.org/security/advisories/FreeBSD-SA-13:06.mmap.asc
http://www.debian.org/security/2013/dsa-2714
http://svnweb.freebsd.org/base?view=revision&revision=251901