Hardened Malloc Light

From Kicksecure
(Redirected from Hardened Malloc Kicksecure)
Jump to navigation Jump to search

Hardened Memory Allocator for many Applications to increase Security.

Info This page is archived.

Deprecation in Kicksecure[edit]

See Hardened Malloc Deprecation in Kicksecure.

Introduction[edit]

Hardened Malloc is a hardened memory allocator which can be used with many applications to increase security.

According to the author's GitHub description: [1]

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 (Defaultarchive.org) 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.

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 crashesarchive.org, 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. [2]

Readers who wish to discuss the integration of Hardened Malloc with Kicksecure should refer to this forum threadarchive.org.

Enable Hardened Malloc Light[edit]

Testers only! Warning: This is for testers-only!

Package hardened-malloc-light-enable [3] is provided as an easy way to enable Hardened Malloc Light globally.

Install package(s) hardened-malloc-light-enable following these instructions

1 Platform specific notice.

2 Update the package lists and upgrade the system The Web Archive Onion Version .

sudo apt update && sudo apt full-upgrade

3 Install the hardened-malloc-light-enable package(s).

Using apt command line --no-install-recommends option The Web Archive Onion Version is in most cases optional.

sudo apt install --no-install-recommends hardened-malloc-light-enable

4 Platform specific notice.

5 Done.

The procedure of installing package(s) hardened-malloc-light-enable is complete.

Check If Hardened Malloc Enabled[edit]

Same instructions as for Hardened Malloc (Original).

Disable Hardened Malloc Light[edit]

Hardened Malloc Light can be disabled either per application or globally.

Disable Hardened Malloc per Application[edit]

See Disable Hardened Malloc per Application.

Disable Hardened Malloc Light Globally[edit]

Apply the following steps to globally disable Hardened Malloc Light.

If the system is still fully functional, the easiest way is to uninstall the hardened-malloc-light-enable package.

sudo apt purge hardened-malloc-light-enable

Otherwise...

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.

cat /etc/ld.so.preload

3) Remove libhardened_malloc-light.so from /etc/ld.so.preload.

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 /etc/ld.so.preload.

sudo rm /etc/ld.so.preload

Issues[edit]

Same as Hardened Malloc (Default) Issues.

Credits and Source Code[edit]

The Hardened Malloc upstream source codearchive.org is maintained by security researcher, Daniel Micay.

This website is the software forkarchive.org homepage for Hardened Malloc, with a focus on easy installation, added user documentation, and integration with Kicksecure, Whonix®archive.org, Debian, and other distributions. The Kicksecure software fork source code can be found herearchive.org.

Footnotes[edit]

  1. https://github.com/GrapheneOS/hardened_mallocarchive.org
  2. 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 memtest86+.
  3. https://github.com/Kicksecure/hardened_malloc/blob/master/debian/control#L42archive.org

We believe security software like Kicksecure needs to remain Open Source and independent. Would you help sustain and grow the project? Learn more about our 12 year success story and maybe DONATE!