from the good-fast-and-cheap? dept.
A small team of researchers at the University of Texas at San Antonio has released their source code for a drop-in malloc replacement and published a paper, FreeGuard: A Faster Secure Heap Allocator (warning for PDF), describing it in detail. It utilizes a novel memory layout, reduces a large number of mmap calls, borrows the "freelist" idea from performance-oriented allocators, and introduces a range of additional security capabilities, all with only a very small performance hit. The paper makes frequent comparisons to the Linux and OpenBSD allocators.
In spite of years of improvements to software security, heap-related attacks still remain a severe threat. One reason is that many existing memory allocators fall short in a variety of aspects. For instance, performance-oriented allocators are designed with very limited countermeasures against attacks, but secure allocators generally suffer from significant performance overhead, e.g., running up to 10× slower. This paper, therefore, introduces FreeGuard, a secure memory allocator that prevents or reduces a wide range of heap-related attacks, such as heap overflows, heap over-reads, use-after-frees, as well as double and invalid frees. FreeGuard has similar performance to the default Linux allocator, with less than 2% overhead on average, but provides significant improvement to security guarantees. FreeGuard also addresses multiple implementation issues of existing secure allocators, such as the issue of scalability. Experimental results demonstrate that FreeGuard is very effective in defending against a variety of heap-related attacks.
The code itself is dual licensed GPL and proprietary.