Conversation

Most of the planned security features are implemented and the remaining work is primarily optimization, extending the internal randomization and further hardening the fully out-of-line metadata. The small allocation quarantine is the only significant feature that's fully missing.
1
3
Replying to
The small and large quarantines will each have 2 components: a queue implemented as a ring buffer and a randomized delay provided by swapping with a random slot in an array. The randomized array for delayed free comes from OpenBSD, although it's only for small allocations there.
1
1
For small allocations, a quarantine will delay updating the bitmaps, so needs a set implementation (open-addressed hash table) or secondary bitmaps tracking the quarantine state for each slot. It's one of the improvements that I made in my previous work extending OpenBSD malloc.
1
2
The malloc_object_size implementation also to be fleshed out, but it's a low priority since it has no benefit without integration work like my previous work on dynamic system call overflow checks in Bionic. This time around, there's also malloc_object_size_fast for broader use.
3