Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If your claim is that OpenBSD routes every call to malloc/free through mmap/munmap, it is simply not believable.

Do you have a URL to a git ... hahaha, pardon me, CVS repo?



http://bxr.su/OpenBSD/lib/libc/stdlib/malloc.c#omalloc ^Not the CVS repo, but close enough for those who want to check OpenBSD's malloc implementation. The malloc.conf manpage is also an interesting read : http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man5/...

And some context around malloc and the various techniques OpenBSD implements to make exploitation of bugs more difficult: http://www.openbsd.org/papers/dev-sw-hostile-env.html

The tl;dr is : if your code compiles and runs on OpenBSD, chances are it will fine on other Unices. The opposite is not necessarily true though.


I don't think that source refutes the parent's point: only large allocations go directly to mmap/munmap as opposed to being cached. Of course, there are other anti-exploitation measures too...



Well you could read the paper he just linked to.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: