{"id":18823640,"url":"https://github.com/yvt/fatalloc","last_synced_at":"2026-01-19T14:30:18.284Z","repository":{"id":45692492,"uuid":"511569612","full_name":"yvt/fatalloc","owner":"yvt","description":"Fault tolerant memory allocator that “fixes” minor heap overruns","archived":false,"fork":false,"pushed_at":"2022-07-15T00:49:43.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T11:04:38.733Z","etag":null,"topics":["linux","memory-allocator","memory-errors","rust","sin","work-around"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yvt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-07T14:55:39.000Z","updated_at":"2022-07-18T16:23:58.000Z","dependencies_parsed_at":"2022-09-23T19:32:18.836Z","dependency_job_id":null,"html_url":"https://github.com/yvt/fatalloc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Ffatalloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Ffatalloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Ffatalloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yvt%2Ffatalloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yvt","download_url":"https://codeload.github.com/yvt/fatalloc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239759898,"owners_count":19692215,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","memory-allocator","memory-errors","rust","sin","work-around"],"created_at":"2024-11-08T00:54:15.130Z","updated_at":"2026-01-19T14:30:18.216Z","avatar_url":"https://github.com/yvt.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n\n# `fatalloc`\n\n**“Fault tolerant” memory allocator for Linux**\n\n\u003c/div\u003e\n\nThis library provides a drop-in replacement for the standard C allocation\nfunctions. Add `libfatalloc.so` to `LD_PRELOAD` to “fix” minor heap overruns\nin faulty software.\n\nUsing this library has a negative impact on security and may lead to loss of\ndata, financial damage, strangelet creation, maximum overdrive, Xindi attacks,\nor death. Use at your own peril.\n\nInspired by Windows [Fault Tolerant Heap][1]. Written in Rust(🚀).\n\n\u003cdetails\u003e\n\u003csummary\u003eWhy the security impact?\u003c/summary\u003e\n\nWhile reducing the likelihood of application crashes may seem appealing to some\npeople, it doesn't necessarily mean bugs are actually fixed if done in a wrong\nway. In fact, application crashes are symptoms of underlying bugs and meant to\nstop the faulty program that is already straying from the designed behavior from\ngoing even worse, e.g., incurring permanent damage to your files, [impeding\nan Iranian nuclear program][7], [violating the right to privacy][8], or even\n[taking human lives][6]. Modern binary exploit mitigation techniques, such as\n[ShadowCallStack][10] and [Control Flow Guard][9], are often designed to\nimmediately abort the faulting program at the first sign of security violation.\nThe heap implementations in modern operating systems evolved as well to detect\nheap usage errors and thwart potential heap-based exploits¹. All this library\ndoes is to undo these efforts.\n\n\u003csub\u003e¹ Mark E. Russinovich, David A. Solomon, Alex Ionescu, *Windows Internals,\nPart 2 (6th edition)*, pp 224–225.\u003c/sub\u003e\n\n\u003c/details\u003e\n\n## Features\n\n- [x] Real-time memory allocator with good throughput (implemented by\n  [`rlsf`][5])\n- [x] Insert padding around allocations to mitigate heap overruns\n- [x] Ignore invalid deallocation requests\n- [ ] Delay deallocation to nullify brief use-after-free\n\n## Usage\n\n### Nix [Flake][2]\n\n```bash\nexport LD_PRELOAD=(nix build --no-link --print-out-paths github:yvt/fatalloc)/lib/libfatalloc.so)\nfaulty-program\n```\n\nTo cross-build for x86 (32-bit) applications:\n\n```bash\nexport LD_PRELOAD=(nix build --no-link --print-out-paths github:yvt/fatalloc#defaultPackage.i686-linux)/lib/libfatalloc.so)\n```\n\n### Traditional Linux\n\nGo to [the Actions tab][3], select the latest CI run, and download a\nprecompiled binary from the Artifacts section.\n\n*Note:* [You must be logged in to GitHub to download artifacts.][4]\n\n## License\n\nThis program is licensed under the GNU Lesser General Public License version 3\nor later.\n\n[1]: https://docs.microsoft.com/en-us/windows/win32/win7appqual/fault-tolerant-heap\n[2]: https://nixos.wiki/wiki/Flakes\n[3]: https://github.com/yvt/fatalloc/actions/workflows/ci.yml\n[4]: https://github.community/t/public-read-access-to-actions-artifacts/17363/11\n[5]: https://github.com/yvt/rlsf\n[6]: https://embeddedgurus.com/state-space/2014/02/are-we-shooting-ourselves-in-the-foot-with-stack-overflow/\n[7]: https://en.wikipedia.org/wiki/Stuxnet\n[8]: https://watchfulip.github.io/2021/09/18/Hikvision-IP-Camera-Unauthenticated-RCE.html\n[9]: https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard\n[10]: https://source.android.com/devices/tech/debug/shadow-call-stack\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyvt%2Ffatalloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyvt%2Ffatalloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyvt%2Ffatalloc/lists"}