Hardened Malloc Light
Hardened Memory Allocator for many Applications to increase Security.
|Hardened Malloc (Default)||Hardened Malloc Light|
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.
Hardened Malloc (Default) unfortunately cannot be globally enabled by default due to Hardened Malloc (Default) Issues.
The development goal of Hardened Malloc Light is pre-installation by default.
Hardened Malloc Light uses different compile time options.
- Hardened Malloc (Default) (compile time options as close to original upstream as possible)
- Hardened Malloc Light (compile time option
VARIANT=lightas provided by upstream)
Both, Hardened Malloc (Default) and Hardened Malloc Light are already installed by default but not yet enabled by default.
Hardened Malloc Light is not yet enabled by default since there are still various known issues. Most notably, it breaks possibly VirtualBox host software crashes, which haven't been reproduced by testers yet.
Advanced users may still wish to use Hardened Malloc (Default) for specific high risk applications.
Before getting started with Hardened Malloc (Light) 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 (Light) enabled. 
Readers who wish to discuss the integration of Hardened Malloc with Kicksecure ™ should refer to this forum thread.
Enable Hardened Malloc Light
hardened-malloc-light-enable  is provided as an easy way to enable Hardened Malloc Light globally.
hardened-malloc-light-enable. To accomplish that, the following steps A. to D. need to be done.
A. Update the package lists.
sudo apt update
B. Upgrade the system.
sudo apt full-upgrade
C. Install the
apt command line parameter
--no-install-recommends is in most cases optional.
sudo apt install --no-install-recommends hardened-malloc-light-enable
The procedure of installing
hardened-malloc-light-enable is complete.
Check If Hardened Malloc Enabled
Same instructions as for Hardened Malloc (Original).
- Check If Hardened Malloc Enabled
- Check If Hardened Malloc Default or Hardened Malloc Light is Enabled
Disable Hardened Malloc Light
Hardened Malloc Light can be disabled either per application or globally.
Disable Hardened Malloc per Application
See Disable Hardened Malloc per Application.
Disable Hardened Malloc Light Globally
Apply the following steps to globally disable Hardened Malloc Light.
If the system is still fully functional, the easiest way is to uninstall the
sudo apt purge hardened-malloc-light-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
/etc/ld.so.preload configuration file.
If not using
/etc/ld.so.preload for anything else, it is the easiest to simply delete the configuration file.
Warning: this removes all entries from
sudo rm /etc/ld.so.preload
Same as Hardened Malloc (Default) Issues.
Credits and Source Code
The Hardened Malloc upstream source code is maintained by security researcher, Daniel Micay.
This website is the software fork homepage for Hardened Malloc, with a focus on easy installation, added user documentation, and integration with Kicksecure ™, Whonix ™, Debian, and other distributions. The Kicksecure ™ software fork source code can be found here.
- ↑ https://github.com/GrapheneOS/hardened_malloc
In the experience of Kicksecure ™ developer Patrick, the VirtualBox host software crashed with Hardened Malloc (Light) 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://github.com/Kicksecure/hardened_malloc/blob/master/debian/control#L42