Hardened Malloc Kicksecure ™
Hardened Malloc is a hardened memory allocator which can be used with many applications to increase security.
According to the author's GitHub description: 
This is a security-focused general purpose memory allocator providing the malloc API along with various extensions. It provides substantial hardening against heap corruption vulnerabilities. The security-focused design also leads to much less metadata overhead and memory waste from fragmentation than a more traditional allocator design. It aims to provide decent overall performance with a focus on long-term performance and memory usage rather than allocator micro-benchmarks. It offers scalability via a configurable number of entirely independently arenas, with the internal locking within arenas further divided up per size class.
The development goal of Hardened Malloc Kicksecure ™ is pre-installation by default in Whonix ™ and Kicksecure ™.
Hardened Malloc Kicksecure ™ uses different compile time options.
hardened-malloc(compile time options as close to original upstream as possible) [archive]
hardened-malloc-kicksecure(modified compile time options) [archive]
Both, Hardened Malloc and Hardened Malloc Kicksecure ™ are already installed by default in Whonix ™ and Kicksecure ™ but not yet enabled by default.
Hardened Malloc Kicksecure ™ is not yet enabled by default since there are still various known issues. Most notably, it breaks the OpenSSH server
sshd on Debian
buster based operating systems, which will be fixed in Debian
bullseye and above and possibly VirtualBox host software crashes [archive], which haven't been reproduced by testers yet.
Advanced users may still wish to use Hardened Malloc for specific high risk applications.
Before getting started with Hardened Malloc (Kicksecure) it is recommended to first test the host operating system using
memtest86+ (link) since hardware issues with RAM might be more likely be resulting in system crashes with Hardened Malloc (Kicksecure) enabled. 
Forum development discussion:
hardened-malloc-kicksecure-enable  is provided as an easy way to enable Hardened Malloc Kicksecure ™ globally.
hardened-malloc-kicksecure can be disabled either per application or globally.
Disable per Application
Apply the following steps to disable
hardened-malloc-kicksecure per application.
chromium with the actual application which should be started without ld system preload.
Apply the following steps to globally disable
If the system is still fully functional, the easiest way is to uninstall the
sudo apt purge hardened-malloc-kicksecure-enable
1) Boot into recovery mode. Optional.
This is only required if the system is no longer bootable. In this case, refer to boot into recovery mode.
2) View the
If not using
/etc/ld.so.preload for anything else. Warning: this removes all entries from
sudo rm /etc/ld.so.preload
slowdown by swap-file-creator shutdown
- related to above cryptsetup slowdown by factor ~ 7
- workaround OK https://github.com/Whonix/swap-file-creator/commit/c65edf17f952ac4a296ae6a0aac5a10541579ff6 [archive]
- https://bugs.debian.org/971876 [archive]
- chromium from flathub also functional (
hardened-malloc-kicksecureprobably disregarded inside flatpak's bubblewrap based sandbox?)
no workaround available
breaks OpenSSH server
sshd in Debian
- Fixed in Debian
bullseye/ Whonix ™ 16. 
cryptsetup slowdown by factor ~ 6
- reported upstream: cryptsetup luksFormat slowdown of factor ~ 6 when using hardened memory allocator Hardened Malloc [archive]
might break Whonix ™ build process
- TODO: test building Whonix ™ with
chromium crashes with hardened-malloc(-kicksecure) (requires disabling using
- glibc feature request: LD_ETC_IGNORE - environment variable to ignore /etc/ld.so.preload configuration file on a per-application basis [archive]
Credits and Source Code
This website [archive] is the software fork [archive] homepage for Hardened Malloc Kicksecure, with a focus on pre-installation by default in Whonix ™ and Kicksecure ™. The software fork source code can be found here [archive]. Continuous integration: travis CI [archive]
- https://github.com/GrapheneOS/hardened_malloc [archive]
In the experience of Whonix ™ developer Patrick, the VirtualBox host software crashed with Hardened Malloc enabled with different error messages when faulty RAM banks where used compared to VirtualBox host software crashes with RAM banks that did not show any errors in
- https://gitlab.com/whonix/hardened_malloc/-/blob/master/debian/control#L42 [archive]
- https://forums.whonix.org/t/hardened-malloc-hardened-memory-allocator/7474/127 [archive]
- https://github.com/GrapheneOS/hardened_malloc/issues/97 [archive]
- workaround idea: https://forums.whonix.org/t/hardened-malloc-hardened-memory-allocator/7474/137 [archive]
- https://github.com/openssh/openssh-portable/pull/142 [archive]
- https://bugzilla.mindrot.org/show_bug.cgi?id=3245 [archive]