Search: Home Bugtraq Vulnerabilities Mailing Lists Jobs Tools Vista
Security-related innovation in Unix
Jason Miller, 2005-09-28

Recently, a good friend of mine forwarded me an article from kerneltrap.org, which talked about a new heap implementation that's being introduced into an upcoming release of the OpenBSD operating system. This article was of specific interest to me, as I have been experimenting with the creation of a more secure heap implementation myself.

Comments Mode:
Security in Unix 2005-09-29
Alexey Vesnin
Security-related innovation in Unix 2005-10-03
Anonymous (9 replies)
Re: Security-related innovation in Unix 2005-10-03
Anonymous
These are opinion columns, so I can't really get into the dirty technical details in the article. A guard page is basically an invalid (or valid but protected) page of memory on either side of an allocated chunk.

For example, let's say you allocated a big chunk of memory, and the heap returned a chunk of memory for you.

[ CHUNK ] <-- void *chunk;
[ CHUNK ]
[ CHUNK ]

Guard pages would basically look like this:

[ GUARD PAGE ]
[ CHUNK ] <-- void *chunk;
[ CHUNK ]
[ CHUNK ]
[ SLACK SPACE ] (dependent on chunk size)
[ GUARD PAGE ]

And as such, if you accessed the byte of memory before your chunk began, you were be touching the guard page, which would cause an exception. Because of page boundaries, the guard page following your chunk may not be immediately adjacent to it, but it will be between your chunk and any subsequent chunks. The point is any access of the guard pages is invalid, and will cause an immediate exception.

Guard pages only separate individual chunks when they are of a specific size; smaller chunks are allocated pseudo-randomly within a single guard-page protected chunk.

Hope that helps, drop me a line personally if you have any further questions.

And, with regard to the three BSD's, I'm assuming that you're forgetting about NetBSD. The three most popular branches of BSD are FreeBSD, OpenBSD, and NetBSD (probably in that order).

bash-3.00$ uname
NetBSD

If you're a fan of BSD, I'd strongly encourage you to give it a try.

J.

[ reply ]

Link to this comment: http://www.securityfocus.com/comments/columns/359/32479#32479
Security-related innovation in Unix 2005-10-03
David Emery (1 replies)
Security-related innovation in Unix 2005-10-03
Todd Knarr (1 replies)
It is a contraction! 2005-10-05
English_language







 

Privacy Statement
Copyright 2007, SecurityFocus