hardened_malloc | Hardened allocator designed for modern systems

 by   GrapheneOS C Version: 11 License: MIT

kandi X-RAY | hardened_malloc Summary

kandi X-RAY | hardened_malloc Summary

hardened_malloc is a C library. hardened_malloc has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

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 independent arenas, with the internal locking within arenas further divided up per size class. This project currently supports Bionic (Android), musl and glibc. It may support other non-Linux operating systems in the future. For Android, there's custom integration and other hardening features which is also planned for musl in the future. The glibc support will be limited to replacing the malloc implementation because musl is a much more robust and cleaner base to build on and can cover the same use cases. This allocator is intended as a successor to a previous implementation based on extending OpenBSD malloc with various additional security features. It's still heavily based on the OpenBSD malloc design, albeit not on the existing code other than reusing the hash table implementation. The main differences in the design are that it's solely focused on hardening rather than finding bugs, uses finer-grained size classes along with slab sizes going beyond 4k to reduce internal fragmentation, doesn't rely on the kernel having fine-grained mmap randomization and only targets 64-bit to make aggressive use of the large address space. There are lots of smaller differences in the implementation approach. It incorporates the previous extensions made to OpenBSD malloc including adding padding to allocations for canaries (distinct from the current OpenBSD malloc canaries), write-after-free detection tied to the existing clearing on free, queues alongside the existing randomized arrays for quarantining allocations and proper double-free detection for quarantined allocations. The per-size-class memory regions with their own random bases were loosely inspired by the size and type-based partitioning in PartitionAlloc. The planned changes to OpenBSD malloc ended up being too extensive and invasive so this project was started as a fresh implementation better able to accomplish the goals. For 32-bit, a port of OpenBSD malloc with small extensions can be used instead as this allocator fundamentally doesn't support that environment.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              hardened_malloc has a medium active ecosystem.
              It has 961 star(s) with 82 fork(s). There are 43 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 22 open issues and 119 have been closed. On average issues are closed in 96 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of hardened_malloc is 11

            kandi-Quality Quality

              hardened_malloc has 0 bugs and 0 code smells.

            kandi-Security Security

              hardened_malloc has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              hardened_malloc code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              hardened_malloc is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              hardened_malloc releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.
              It has 261 lines of code, 40 functions and 3 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of hardened_malloc
            Get all kandi verified functions for this library.

            hardened_malloc Key Features

            No Key Features are available at this moment for hardened_malloc.

            hardened_malloc Examples and Code Snippets

            No Code Snippets are available at this moment for hardened_malloc.

            Community Discussions

            No Community Discussions are available at this moment for hardened_malloc.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install hardened_malloc

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/GrapheneOS/hardened_malloc.git

          • CLI

            gh repo clone GrapheneOS/hardened_malloc

          • sshUrl

            git@github.com:GrapheneOS/hardened_malloc.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link