Skip to content

Add a security benchmark #153

@jvoisin

Description

@jvoisin

It would be nice to have a security-related benchmark, not focused on memory consumption or speed, but on the ability of allocators to detect and neuter memory corruptions. For example, allocators should instantly abort on double-free.

List of tests to add, for large, small and medium allocations:

  • Double-free
  • Double-free, delayed
  • Double-free, interleaved
  • Invalid free
  • 1-byte overflow
  • 1-byte underflow
  • 1Mb overflow
  • 1Mb underflow
  • Read-after-free
  • Write-after-free
  • Read of a zero-sized allocation
  • Write of a zero-sized allocation
  • Unaligned free
  • Uninitialized free
  • Sized delete in C++
  • Guarded memcpy/memset

We should take inspiration from hardened_malloc's testsuite, and shellphish's how2heap

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions