Skip to content

divestedcg/rpm-hardened_malloc

 
 

Repository files navigation

Unofficial package for hardened_malloc

Overview

This repo contains an RPM specfile and a PKGBUILD for micro-architecture optimized builds of the hardened_malloc library.

Upstream Project

Compatibility

  • Fedora 40/41/42/etc.
  • Arch Linux

Prebuilts

Modifications

Included Variants

Five variants are included compiled for four different micro-architectures:

  • mpk
    • prioritizes security, passes all tests
      • protects allocator metadata using Memory Protection Keys
      • needs processor support: grep -q " pku " /proc/cpuinfo && echo "Supported" || echo "Not supported"
      • incompatible with systemd's default seccomp filter, no easy way to override
  • bocs
    • prioritizes security, passes all tests
  • default
    • prioritizes security, passes all tests
  • memefficient
    • prioritizes memory usage, passes all tests
      • decreases arenas used from 4 to 1
      • disables extended size classes
  • light
    • prioritizes CPU and memory usage, fails six tests
      • disables slab quarantines
      • disables write after free check
      • disables slot randomization
      • raises the guard slab interval from 1 to 8

The default is chosen at install time depending:

  • 12GB+ RAM: -default
  • <12GB RAM: -memefficient

Known Issues

License

MIT

Credits

  • @GrapheneOS for the hardened_malloc project itself
  • @noatsecure/HardHatOS for the original RPM specfile
  • @thithib for the original PKGBUILD
  • Whonix for the bubblewrap command to disable the preload

About

Unofficial micro-architecture optimized hardened_malloc package

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE-library
MIT
LICENSE-spec

Stars

Watchers

Forks

Languages

  • Shell 100.0%